From 867eb33477c07331e7b58302119308d02a02ee01 Mon Sep 17 00:00:00 2001 From: taesub kim Date: Tue, 10 Nov 2015 21:34:24 -0800 Subject: [PATCH] Revert "Update to 7.40.1" This reverts commit 32de14ae0782822e9c54c3fbb28cdefc1f4de969. Change-Id: I955d8a59ce444eac32b74264d98272297ac51b9b --- CHANGES.0 | 62 +- CMake/CurlCheckCSourceCompiles.cmake | 75 ++ CMake/CurlCheckCSourceRuns.cmake | 83 ++ CMake/CurlTests.c | 316 ++++-- CMake/FindGSS.cmake | 289 ----- CMake/FindLibSSH2.cmake | 35 - CMake/FindOpenSSL.cmake | 21 + CMake/FindZLIB.cmake | 10 + CMake/Macros.cmake | 95 -- CMake/OtherTests.cmake | 207 ++-- CMake/Platforms/WindowsCache.cmake | 2 +- CMakeLists.txt | 657 ++++-------- COPYING | 2 +- Makefile.am | 10 +- Makefile.dist | 256 +---- RELEASE-NOTES | 104 +- TODO-RELEASE | 4 + acinclude.m4 | 4 +- buildconf | 47 +- configure.ac | 182 ++-- contributors.sh | 28 +- curl.manifest | 5 - docs/BINDINGS | 5 - docs/FAQ | 56 +- docs/FEATURES | 40 +- docs/HISTORY | 242 ++--- docs/INSTALL | 80 +- docs/INSTALL.cmake | 2 + docs/INTERNALS | 18 +- docs/KNOWN_BUGS | 15 +- docs/LICENSE-MIXING | 18 +- docs/MAIL-ETIQUETTE | 37 - docs/MANUAL | 43 +- docs/RELEASE-PROCEDURE | 61 +- docs/ROADMAP.md | 41 +- docs/SECURITY | 30 +- docs/SSLCERTS | 131 +-- docs/THANKS | 116 +- docs/THANKS-filter | 48 - docs/TODO | 264 ++--- docs/TheArtOfHttpScripting | 7 +- docs/curl.1 | 275 ++--- docs/examples/10-at-a-time.c | 1 + docs/examples/Makefile.inc | 42 +- docs/examples/Makefile.m32 | 8 +- docs/examples/Makefile.netware | 9 +- docs/examples/asiohiper.cpp | 135 ++- docs/examples/externalsocket.c | 4 +- docs/examples/fopen.c | 35 +- docs/examples/ftp-wildcard.c | 16 +- docs/examples/httpcustomheader.c | 25 +- docs/examples/imap-multi.c | 38 +- docs/examples/multi-app.c | 35 +- docs/examples/multi-debugcallback.c | 35 +- docs/examples/multi-double.c | 35 +- docs/examples/multi-post.c | 35 +- docs/examples/multi-single.c | 79 +- docs/examples/multi-uv.c | 82 +- docs/examples/pop3-multi.c | 38 +- docs/examples/sepheaders.c | 19 +- docs/examples/smtp-multi.c | 38 +- docs/examples/synctime.c | 19 +- docs/libcurl/ABI | 19 +- docs/libcurl/curl_easy_cleanup.3 | 36 +- docs/libcurl/curl_easy_duphandle.3 | 7 +- docs/libcurl/curl_easy_escape.3 | 25 +- docs/libcurl/curl_easy_getinfo.3 | 16 +- docs/libcurl/curl_easy_init.3 | 38 +- docs/libcurl/curl_easy_pause.3 | 5 +- docs/libcurl/curl_easy_perform.3 | 12 +- docs/libcurl/curl_easy_reset.3 | 5 +- docs/libcurl/curl_easy_setopt.3 | 77 +- docs/libcurl/curl_easy_strerror.3 | 9 +- docs/libcurl/curl_formadd.3 | 4 - docs/libcurl/curl_free.3 | 4 +- docs/libcurl/curl_getdate.3 | 5 +- docs/libcurl/curl_global_init.3 | 13 +- docs/libcurl/curl_multi_add_handle.3 | 28 +- docs/libcurl/curl_multi_assign.3 | 4 +- docs/libcurl/curl_multi_fdset.3 | 39 +- docs/libcurl/curl_multi_perform.3 | 7 +- docs/libcurl/curl_multi_remove_handle.3 | 17 +- docs/libcurl/curl_multi_setopt.3 | 185 +++- docs/libcurl/curl_multi_wait.3 | 10 +- docs/libcurl/curl_version_info.3 | 24 +- docs/libcurl/getinfo-times | 2 +- docs/libcurl/libcurl-easy.3 | 19 +- docs/libcurl/libcurl-errors.3 | 7 - docs/libcurl/libcurl-multi.3 | 71 +- docs/libcurl/libcurl-share.3 | 1 - docs/libcurl/libcurl-tutorial.3 | 103 +- docs/libcurl/libcurl.3 | 100 +- docs/libcurl/libcurl.m4 | 21 - .../opts/CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3 | 48 - .../opts/CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3 | 47 - docs/libcurl/opts/CURLMOPT_MAXCONNECTS.3 | 62 -- docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.3 | 54 - docs/libcurl/opts/CURLMOPT_MAX_PIPELINE_LENGTH.3 | 51 - docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3 | 50 - docs/libcurl/opts/CURLMOPT_PIPELINING.3 | 57 - docs/libcurl/opts/CURLMOPT_PIPELINING_SERVER_BL.3 | 60 -- docs/libcurl/opts/CURLMOPT_PIPELINING_SITE_BL.3 | 56 - docs/libcurl/opts/CURLMOPT_SOCKETDATA.3 | 49 - docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3 | 62 -- docs/libcurl/opts/CURLMOPT_TIMERDATA.3 | 48 - docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3 | 63 -- docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.3 | 1 - docs/libcurl/opts/CURLOPT_CAINFO.3 | 1 - docs/libcurl/opts/CURLOPT_CAPATH.3 | 9 +- docs/libcurl/opts/CURLOPT_CERTINFO.3 | 2 +- docs/libcurl/opts/CURLOPT_CHUNK_BGN_FUNCTION.3 | 2 +- docs/libcurl/opts/CURLOPT_CONNECT_ONLY.3 | 4 +- docs/libcurl/opts/CURLOPT_COOKIE.3 | 2 +- docs/libcurl/opts/CURLOPT_COOKIEJAR.3 | 2 +- docs/libcurl/opts/CURLOPT_COOKIELIST.3 | 8 +- docs/libcurl/opts/CURLOPT_COPYPOSTFIELDS.3 | 26 +- docs/libcurl/opts/CURLOPT_CRLF.3 | 2 +- docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.3 | 2 +- docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.3 | 98 +- docs/libcurl/opts/CURLOPT_DIRLISTONLY.3 | 22 +- docs/libcurl/opts/CURLOPT_ERRORBUFFER.3 | 17 +- docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.3 | 21 +- docs/libcurl/opts/CURLOPT_FTPSSLAUTH.3 | 2 +- docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.3 | 2 +- docs/libcurl/opts/CURLOPT_HEADEROPT.3 | 14 +- docs/libcurl/opts/CURLOPT_HTTPAUTH.3 | 14 +- docs/libcurl/opts/CURLOPT_HTTPGET.3 | 15 +- docs/libcurl/opts/CURLOPT_HTTPHEADER.3 | 5 - docs/libcurl/opts/CURLOPT_HTTPPOST.3 | 24 +- docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.3 | 1 - docs/libcurl/opts/CURLOPT_IOCTLFUNCTION.3 | 2 +- docs/libcurl/opts/CURLOPT_MAIL_AUTH.3 | 2 +- docs/libcurl/opts/CURLOPT_MAIL_FROM.3 | 2 +- docs/libcurl/opts/CURLOPT_MAIL_RCPT.3 | 2 +- docs/libcurl/opts/CURLOPT_MAXCONNECTS.3 | 14 +- docs/libcurl/opts/CURLOPT_MAXREDIRS.3 | 18 +- docs/libcurl/opts/CURLOPT_NOBODY.3 | 22 +- docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY.3 | 65 -- docs/libcurl/opts/CURLOPT_POSTFIELDS.3 | 19 +- docs/libcurl/opts/CURLOPT_POSTFIELDSIZE.3 | 16 +- docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3 | 20 +- docs/libcurl/opts/CURLOPT_POSTREDIR.3 | 20 +- docs/libcurl/opts/CURLOPT_PROTOCOLS.3 | 50 +- docs/libcurl/opts/CURLOPT_PROXYPASSWORD.3 | 2 +- docs/libcurl/opts/CURLOPT_PROXYUSERNAME.3 | 2 +- docs/libcurl/opts/CURLOPT_PROXYUSERPWD.3 | 2 +- docs/libcurl/opts/CURLOPT_PUT.3 | 2 +- docs/libcurl/opts/CURLOPT_RANGE.3 | 17 +- docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS.3 | 50 +- docs/libcurl/opts/CURLOPT_RESOLVE.3 | 18 +- docs/libcurl/opts/CURLOPT_RESUME_FROM.3 | 20 +- docs/libcurl/opts/CURLOPT_RESUME_FROM_LARGE.3 | 23 +- docs/libcurl/opts/CURLOPT_SASL_IR.3 | 10 +- docs/libcurl/opts/CURLOPT_SSH_KEYDATA.3 | 2 +- docs/libcurl/opts/CURLOPT_SSLVERSION.3 | 21 +- docs/libcurl/opts/CURLOPT_SSL_VERIFYPEER.3 | 6 - docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.3 | 53 - docs/libcurl/opts/CURLOPT_TIMEOUT.3 | 3 - docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.3 | 4 +- docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.3 | 4 +- docs/libcurl/opts/CURLOPT_UNIX_SOCKET_PATH.3 | 78 -- docs/libcurl/opts/CURLOPT_UPLOAD.3 | 23 +- docs/libcurl/opts/CURLOPT_URL.3 | 37 +- docs/libcurl/opts/CURLOPT_USERNAME.3 | 18 +- docs/libcurl/opts/CURLOPT_USERPWD.3 | 21 +- docs/libcurl/opts/CURLOPT_USE_SSL.3 | 12 - docs/libcurl/opts/CURLOPT_VERBOSE.3 | 19 +- docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.3 | 2 +- docs/libcurl/opts/Makefile.am | 80 +- docs/libcurl/symbols-in-versions | 21 +- docs/mk-ca-bundle.1 | 2 +- include/curl/curl.h | 85 +- include/curl/curlver.h | 12 +- install-sh | 14 +- lib/CMakeLists.txt | 23 +- lib/Makefile.Watcom | 11 +- lib/Makefile.b32 | 2 +- lib/Makefile.inc | 78 +- lib/Makefile.m32 | 50 +- lib/Makefile.netware | 45 +- lib/Makefile.vc6 | 10 +- lib/Makefile.vxworks | 4 +- lib/README.hostip | 4 +- lib/README.http2 | 13 +- lib/asyn-ares.c | 22 +- lib/asyn-thread.c | 92 +- lib/base64.c | 90 +- lib/config-dos.h | 1 + lib/config-os400.h | 20 +- lib/config-symbian.h | 11 +- lib/config-tpf.h | 11 +- lib/config-vxworks.h | 3 + lib/config-win32.h | 66 +- lib/conncache.c | 21 +- lib/conncache.h | 5 +- lib/connect.c | 144 ++- lib/connect.h | 2 +- lib/cookie.c | 181 ++-- lib/curl_addrinfo.c | 43 +- lib/curl_addrinfo.h | 4 - lib/curl_base64.h | 5 +- lib/curl_config.h.cmake | 527 +++++---- lib/curl_endian.c | 233 ---- lib/curl_endian.h | 70 -- lib/curl_gssapi.c | 63 +- lib/curl_gssapi.h | 30 +- lib/curl_md4.h | 12 +- lib/curl_multibyte.c | 7 +- lib/curl_multibyte.h | 12 +- lib/curl_ntlm.c | 56 +- lib/curl_ntlm.h | 10 +- lib/curl_ntlm_core.c | 209 ++-- lib/curl_ntlm_core.h | 55 +- lib/curl_ntlm_msgs.c | 411 ++++--- lib/curl_ntlm_msgs.h | 34 + lib/curl_ntlm_wb.c | 80 +- lib/curl_ntlm_wb.h | 7 +- lib/curl_rtmp.c | 19 +- lib/curl_sasl.c | 632 ++--------- lib/curl_sasl.h | 66 -- lib/curl_sasl_gssapi.c | 390 ------- lib/curl_sasl_sspi.c | 1133 ++------------------ lib/curl_sec.h | 4 +- lib/curl_setup.h | 23 +- lib/curl_sspi.h | 196 ++-- lib/curl_threads.c | 7 +- lib/curl_threads.h | 9 +- lib/easy.c | 170 +-- lib/escape.c | 15 +- lib/file.c | 51 +- lib/formdata.c | 74 +- lib/ftp.c | 211 ++-- lib/ftp.h | 11 +- lib/ftplistparser.c | 48 +- lib/getinfo.c | 62 +- lib/gopher.c | 6 +- lib/hostasyn.c | 12 +- lib/hostcheck.c | 5 +- lib/hostip.c | 76 +- lib/hostip.h | 13 +- lib/hostip4.c | 10 +- lib/hostip6.c | 12 +- lib/http.c | 362 +++---- lib/http.h | 5 +- lib/http2.c | 345 ++---- lib/http2.h | 5 +- lib/http_digest.c | 539 ++++++++-- lib/http_digest.h | 21 +- lib/http_negotiate.c | 223 +++- lib/http_negotiate.h | 4 +- lib/http_negotiate_sspi.c | 210 ++-- lib/http_proxy.c | 70 +- lib/idn_win32.c | 29 +- lib/if2ip.c | 83 +- lib/if2ip.h | 13 +- lib/imap.c | 207 +--- lib/imap.h | 4 - lib/krb5.c | 21 +- lib/ldap.c | 591 +++------- lib/md4.c | 8 +- lib/mk-ca-bundle.pl | 175 +-- lib/mk-ca-bundle.vbs | 13 +- lib/multi.c | 591 +++++----- lib/multihandle.h | 5 +- lib/multiif.h | 7 +- lib/non-ascii.c | 55 +- lib/openldap.c | 125 +-- lib/parsedate.c | 11 +- lib/pingpong.c | 46 +- lib/pipeline.c | 10 +- lib/pop3.c | 199 +--- lib/pop3.h | 6 +- lib/progress.c | 22 +- lib/security.c | 54 +- lib/select.c | 16 +- lib/sendf.c | 199 ++-- lib/sendf.h | 6 +- lib/setup-os400.h | 18 +- lib/setup-vms.h | 33 +- lib/smb.c | 976 ----------------- lib/smb.h | 271 ----- lib/smtp.c | 288 +---- lib/smtp.h | 6 +- lib/socks.c | 48 +- lib/socks.h | 2 +- lib/socks_gssapi.c | 94 +- lib/socks_sspi.c | 46 +- lib/speedcheck.c | 6 +- lib/ssh.c | 128 +-- lib/ssh.h | 30 +- lib/strdup.c | 31 +- lib/strdup.h | 3 +- lib/strerror.c | 16 +- lib/strtoofft.h | 11 +- lib/telnet.c | 26 +- lib/tftp.c | 44 +- lib/timeval.c | 10 +- lib/transfer.c | 99 +- lib/url.c | 482 +++------ lib/urldata.h | 114 +- lib/version.c | 31 +- lib/vtls/axtls.c | 17 - lib/vtls/axtls.h | 17 +- lib/vtls/curl_darwinssl.c | 311 ++---- lib/vtls/curl_darwinssl.h | 21 +- lib/vtls/curl_schannel.c | 204 ++-- lib/vtls/curl_schannel.h | 39 +- lib/vtls/cyassl.c | 95 +- lib/vtls/cyassl.h | 15 +- lib/vtls/gskit.c | 315 +++--- lib/vtls/gskit.h | 9 +- lib/vtls/gtls.c | 157 +-- lib/vtls/gtls.h | 26 +- lib/vtls/nss.c | 351 +++--- lib/vtls/nssg.h | 32 +- lib/vtls/openssl.c | 442 +++----- lib/vtls/openssl.h | 37 +- lib/vtls/polarssl.c | 116 +- lib/vtls/polarssl.h | 20 +- lib/vtls/qssl.c | 527 +++++++++ lib/vtls/qssl.h | 61 ++ lib/vtls/vtls.c | 257 +---- lib/vtls/vtls.h | 43 +- lib/x509asn1.c | 35 +- lib/x509asn1.h | 10 +- maketgz | 2 +- mkinstalldirs | 4 +- packages/DOS/common.dj | 2 +- packages/EPM/README | 2 +- packages/OS400/README.OS400 | 13 +- packages/OS400/ccsidcurl.c | 46 +- packages/OS400/curl.inc.in | 27 +- packages/OS400/make-lib.sh | 11 +- packages/OS400/os400sys.c | 111 +- packages/Symbian/group/libcurl.mmp | 5 +- packages/vms/backup_gnv_curl_src.com | 6 +- packages/vms/build_curl-config_script.com | 346 ++++-- packages/vms/build_libcurl_pc.com | 2 +- packages/vms/build_vms.com | 20 +- packages/vms/config_h.com | 2 +- packages/vms/curl_crtl_init.c | 4 +- packages/vms/curl_gnv_build_steps.txt | 53 +- packages/vms/generate_config_vms_h_curl.com | 39 - packages/vms/gnv_curl_configure.sh | 2 +- packages/vms/gnv_link_curl.com | 11 +- packages/vms/make_gnv_curl_install.sh | 2 +- packages/vms/pcsi_product_gnv_curl.com | 30 +- packaging/baselibs.conf | 1 + packaging/curl.changes | 7 + packaging/curl.manifest | 5 + packaging/curl.spec | 119 +- projects/README | 27 +- projects/Windows/VC10/curl.sln | 40 - projects/Windows/VC10/lib/libcurl.sln | 24 - projects/Windows/VC10/lib/libcurl.tmpl | 480 +-------- projects/Windows/VC10/src/curlsrc.sln | 24 - projects/Windows/VC10/src/curlsrc.tmpl | 684 ++++-------- projects/Windows/VC11/curl.sln | 40 - projects/Windows/VC11/lib/libcurl.sln | 24 - projects/Windows/VC11/lib/libcurl.tmpl | 488 +-------- projects/Windows/VC11/src/curlsrc.sln | 24 - projects/Windows/VC11/src/curlsrc.tmpl | 692 ++++-------- projects/Windows/VC12/curl.sln | 40 - projects/Windows/VC12/lib/libcurl.sln | 24 - projects/Windows/VC12/lib/libcurl.tmpl | 488 +-------- projects/Windows/VC12/src/curlsrc.sln | 24 - projects/Windows/VC12/src/curlsrc.tmpl | 692 ++++-------- projects/Windows/VC6/lib/libcurl.tmpl | 198 +--- projects/Windows/VC6/src/curlsrc.tmpl | 188 +--- projects/Windows/VC7.1/curl.sln | 20 - projects/Windows/VC7.1/lib/libcurl.sln | 12 - projects/Windows/VC7.1/lib/libcurl.tmpl | 249 +---- projects/Windows/VC7.1/src/curlsrc.sln | 12 - projects/Windows/VC7.1/src/curlsrc.tmpl | 324 ++---- projects/Windows/VC7/curl.sln | 52 +- projects/Windows/VC7/lib/libcurl.sln | 44 +- projects/Windows/VC7/lib/libcurl.tmpl | 225 +--- projects/Windows/VC7/src/curlsrc.sln | 44 +- projects/Windows/VC7/src/curlsrc.tmpl | 300 ++---- projects/Windows/VC8/curl.sln | 40 - projects/Windows/VC8/lib/libcurl.sln | 24 - projects/Windows/VC8/lib/libcurl.tmpl | 728 +------------ projects/Windows/VC8/src/curlsrc.sln | 24 - projects/Windows/VC8/src/curlsrc.tmpl | 948 ++++------------ projects/Windows/VC9/curl.sln | 40 - projects/Windows/VC9/lib/libcurl.sln | 24 - projects/Windows/VC9/lib/libcurl.tmpl | 724 +------------ projects/Windows/VC9/src/curlsrc.sln | 24 - projects/Windows/VC9/src/curlsrc.tmpl | 940 ++++------------ projects/build-openssl.bat | 51 +- projects/checksrc.bat | 84 -- projects/generate.bat | 169 +-- src/.gitignore | 1 + src/CMakeLists.txt | 48 +- src/Makefile.Watcom | 2 +- src/Makefile.am | 5 +- src/Makefile.b32 | 2 +- src/Makefile.inc | 4 +- src/Makefile.m32 | 52 +- src/Makefile.netware | 22 +- src/Makefile.vc6 | 22 +- src/macos/MACINSTALL.TXT | 2 +- src/tool_binmode.c | 4 +- src/tool_cb_dbg.c | 2 +- src/tool_cfgable.c | 9 +- src/tool_cfgable.h | 11 +- src/tool_getparam.c | 41 +- src/tool_help.c | 125 ++- src/tool_hugehelp.c.cvs | 23 - src/tool_libinfo.c | 4 +- src/tool_main.c | 2 +- src/tool_operate.c | 186 ++-- src/tool_operhlp.c | 17 +- src/tool_paramhlp.c | 2 - src/tool_parsecfg.c | 2 +- src/tool_setopt.c | 2 - src/tool_setopt.h | 4 +- src/tool_setup.h | 5 +- src/tool_sleep.c | 4 +- src/tool_strdup.c | 47 - src/tool_strdup.h | 30 - src/tool_urlglob.c | 89 +- src/tool_urlglob.h | 8 +- src/tool_util.c | 13 +- src/tool_xattr.c | 9 +- tests/CMakeLists.txt | 1 - tests/FILEFORMAT | 24 +- tests/README | 3 - tests/certs/Makefile.am | 8 +- tests/certs/Server-localhost-sv.pub.der | Bin 162 -> 0 bytes tests/certs/Server-localhost-sv.pub.pem | 6 - tests/certs/Server-localhost.nn-sv.pub.der | Bin 162 -> 0 bytes tests/certs/Server-localhost.nn-sv.pub.pem | 6 - tests/certs/Server-localhost0h-sv.pub.der | Bin 162 -> 0 bytes tests/certs/Server-localhost0h-sv.pub.pem | 6 - tests/certs/scripts/genserv.sh | 6 - tests/data/CMakeLists.txt | 7 - tests/data/Makefile.am | 139 ++- tests/data/Makefile.inc | 164 --- tests/data/test1001 | 1 - tests/data/test1002 | 1 - tests/data/test1030 | 1 - tests/data/test1041 | 2 +- tests/data/test1042 | 6 +- tests/data/test1060 | 1 - tests/data/test1061 | 1 - tests/data/test1071 | 1 - tests/data/test1079 | 1 - tests/data/test1086 | 1 - tests/data/test1095 | 1 - tests/data/test1105 | 3 +- tests/data/test1113 | 1 - tests/data/test1229 | 1 - tests/data/test1404 | 2 +- tests/data/test1405 | 2 +- tests/data/test1406 | 4 +- tests/data/test1407 | 5 +- tests/data/test1412 | 1 - tests/data/test1418 | 1 - tests/data/test1420 | 108 -- tests/data/test1429 | 69 -- tests/data/test1430 | 53 - tests/data/test1431 | 53 - tests/data/test1432 | 54 - tests/data/test1433 | 69 -- tests/data/test1434 | 90 -- tests/data/test1435 | 46 - tests/data/test1436 | 85 -- tests/data/test1511 | 6 +- tests/data/test1520 | 63 -- tests/data/test1527 | 60 +- tests/data/test1529 | 43 - tests/data/test153 | 1 - tests/data/test154 | 1 - tests/data/test167 | 1 - tests/data/test168 | 1 - tests/data/test1800 | 55 - tests/data/test1801 | 66 -- tests/data/test1901 | 1 - tests/data/test1902 | 1 - tests/data/test1903 | 1 - tests/data/test194 | 18 +- tests/data/test2013 | 2 +- tests/data/test2014 | 2 +- tests/data/test2015 | 2 +- tests/data/test2016 | 2 +- tests/data/test2017 | 2 +- tests/data/test2018 | 2 +- tests/data/test2019 | 2 +- tests/data/test2020 | 2 +- tests/data/test2021 | 2 +- tests/data/test2022 | 2 +- tests/data/test2024 | 4 - tests/data/test2026 | 4 - tests/data/test2027 | 4 - tests/data/test2034 | 58 - tests/data/test2035 | 44 - tests/data/test2036 | 39 - tests/data/test2037 | 58 - tests/data/test2038 | 44 - tests/data/test206 | 1 - tests/data/test22 | 2 +- tests/data/test245 | 1 - tests/data/test246 | 1 - tests/data/test258 | 1 - tests/data/test259 | 1 - tests/data/test273 | 1 - tests/data/test287 | 20 +- tests/data/test31 | 55 +- tests/data/test33 | 2 +- tests/data/test506 | 40 +- tests/data/test540 | 1 - tests/data/test545 | Bin 798 -> 795 bytes tests/data/test551 | 1 - tests/data/test552 | Bin 142985 -> 142979 bytes tests/data/test565 | 1 - tests/data/test573 | 1 - tests/data/test574 | 2 +- tests/data/test576 | 2 +- tests/data/test579 | 11 +- tests/data/test599 | 6 +- tests/data/test61 | 1 - tests/data/test64 | 1 - tests/data/test65 | 1 - tests/data/test70 | 1 - tests/data/test72 | 1 - tests/data/test8 | 3 +- tests/data/test88 | 1 - tests/data/test941 | 66 -- tests/getpart.pm | 2 +- tests/http_pipe.py | 24 +- tests/httpserver.pl | 15 +- tests/libtest/CMakeLists.txt | 15 +- tests/libtest/Makefile.inc | 13 +- tests/libtest/lib1509.c | 7 +- tests/libtest/lib1520.c | 114 -- tests/libtest/lib1527.c | 1 - tests/libtest/lib1529.c | 59 - tests/libtest/lib1900.c | 2 +- tests/libtest/lib506.c | 60 +- tests/libtest/lib544.c | 19 +- tests/libtest/lib556.c | 3 +- tests/libtest/lib599.c | 12 - tests/libtest/sethostname.h | 8 +- tests/libtest/test1013.pl | 6 +- tests/runtests.pl | 323 ++---- tests/secureserver.pl | 61 +- tests/server/CMakeLists.txt | 6 +- tests/server/resolve.c | 10 +- tests/server/server_sockaddr.h | 9 +- tests/server/sockfilt.c | 106 +- tests/server/sws.c | 291 ++--- tests/server/tftpd.c | 2 +- tests/serverhelp.pm | 4 +- tests/sshhelp.pm | 4 +- tests/sshserver.pl | 65 +- tests/symbol-scan.pl | 16 +- tests/testcurl.pl | 14 +- tests/unit/unit1302.c | 20 +- tests/unit/unit1397.c | 3 +- winbuild/BUILD.WINDOWS.txt | 3 +- winbuild/Makefile.vc | 27 +- winbuild/MakefileBuild.vc | 43 +- winbuild/gen_resp_file.bat | 10 +- 564 files changed, 10962 insertions(+), 27105 deletions(-) create mode 100644 CMake/CurlCheckCSourceCompiles.cmake create mode 100644 CMake/CurlCheckCSourceRuns.cmake delete mode 100644 CMake/FindGSS.cmake delete mode 100644 CMake/FindLibSSH2.cmake create mode 100644 CMake/FindOpenSSL.cmake create mode 100644 CMake/FindZLIB.cmake delete mode 100644 CMake/Macros.cmake create mode 100644 TODO-RELEASE delete mode 100644 curl.manifest delete mode 100644 docs/THANKS-filter delete mode 100644 docs/libcurl/opts/CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3 delete mode 100644 docs/libcurl/opts/CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3 delete mode 100644 docs/libcurl/opts/CURLMOPT_MAXCONNECTS.3 delete mode 100644 docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.3 delete mode 100644 docs/libcurl/opts/CURLMOPT_MAX_PIPELINE_LENGTH.3 delete mode 100644 docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3 delete mode 100644 docs/libcurl/opts/CURLMOPT_PIPELINING.3 delete mode 100644 docs/libcurl/opts/CURLMOPT_PIPELINING_SERVER_BL.3 delete mode 100644 docs/libcurl/opts/CURLMOPT_PIPELINING_SITE_BL.3 delete mode 100644 docs/libcurl/opts/CURLMOPT_SOCKETDATA.3 delete mode 100644 docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3 delete mode 100644 docs/libcurl/opts/CURLMOPT_TIMERDATA.3 delete mode 100644 docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3 delete mode 100644 docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY.3 delete mode 100644 docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.3 delete mode 100644 docs/libcurl/opts/CURLOPT_UNIX_SOCKET_PATH.3 delete mode 100644 lib/curl_endian.c delete mode 100644 lib/curl_endian.h delete mode 100644 lib/curl_sasl_gssapi.c delete mode 100644 lib/smb.c delete mode 100644 lib/smb.h create mode 100644 lib/vtls/qssl.c create mode 100644 lib/vtls/qssl.h create mode 100644 packaging/baselibs.conf create mode 100644 packaging/curl.changes create mode 100644 packaging/curl.manifest delete mode 100644 projects/checksrc.bat delete mode 100644 src/tool_strdup.c delete mode 100644 src/tool_strdup.h delete mode 100644 tests/certs/Server-localhost-sv.pub.der delete mode 100644 tests/certs/Server-localhost-sv.pub.pem delete mode 100644 tests/certs/Server-localhost.nn-sv.pub.der delete mode 100644 tests/certs/Server-localhost.nn-sv.pub.pem delete mode 100644 tests/certs/Server-localhost0h-sv.pub.der delete mode 100644 tests/certs/Server-localhost0h-sv.pub.pem delete mode 100644 tests/data/CMakeLists.txt delete mode 100644 tests/data/Makefile.inc delete mode 100644 tests/data/test1420 delete mode 100644 tests/data/test1429 delete mode 100644 tests/data/test1430 delete mode 100644 tests/data/test1431 delete mode 100644 tests/data/test1432 delete mode 100644 tests/data/test1433 delete mode 100644 tests/data/test1434 delete mode 100644 tests/data/test1435 delete mode 100644 tests/data/test1436 delete mode 100644 tests/data/test1520 delete mode 100644 tests/data/test1529 delete mode 100644 tests/data/test1800 delete mode 100644 tests/data/test1801 delete mode 100644 tests/data/test2034 delete mode 100644 tests/data/test2035 delete mode 100644 tests/data/test2036 delete mode 100644 tests/data/test2037 delete mode 100644 tests/data/test2038 delete mode 100644 tests/data/test941 delete mode 100644 tests/libtest/lib1520.c delete mode 100644 tests/libtest/lib1529.c diff --git a/CHANGES.0 b/CHANGES.0 index eab26da..d2413fa 100644 --- a/CHANGES.0 +++ b/CHANGES.0 @@ -267,7 +267,7 @@ Daniel Stenberg (16 Apr 2010) Daniel Stenberg (15 Apr 2010) - Rainer Canavan filed bug report #2987196 that identified libcurl doing unnecesary reverse name lookups in many cases when built to use IPv4 and - getaddrinfo(). The logic for IPv6 is now used for IPv4 too. + getaddrinfo(). The logic for ipv6 is now used for ipv4 too. (http://curl.haxx.se/bug/view.cgi?id=2963679) @@ -4271,7 +4271,7 @@ Daniel S (15 Nov 2007) list. - Michal Marek fixed the test suite to better deal with the case when the HTTP - IPv6 server can't run. + ipv6 server can't run. Yang Tse (14 Nov 2007) - Fix a variable potential wrapping in add_buffer() when using absolutely @@ -6109,7 +6109,7 @@ Daniel (22 August 2006) - David McCreedy fixed a remaining mistake from the August 19 TYPE change. - Peter Sylvester pointed out a flaw in the AllowServerConnect() in the FTP - code when doing pure IPv6 EPRT connections. + code when doing pure ipv6 EPRT connections. Daniel (19 August 2006) - Based on a patch by Armel Asselin, the FTP code no longer re-issues the TYPE @@ -6666,8 +6666,8 @@ Daniel (24 January 2006) Daniel (20 January 2006) - Duane Cathey was one of our friends who reported that curl -P [IP] - (CURLOPT_FTPPORT) didn't work for IPv6-enabed curls if the IP wasn't a - "native" IP while it works fine for IPv6-disabled builds! + (CURLOPT_FTPPORT) didn't work for ipv6-enabed curls if the IP wasn't a + "native" IP while it works fine for ipv6-disabled builds! In the process of fixing this, I removed the support for LPRT since I can't think of many reasons to keep doing it and asking on the mailing list didn't @@ -6676,7 +6676,7 @@ Daniel (20 January 2006) Daniel (19 January 2006) - Jon Turner pointed out that doing -P [hostname] (CURLOPT_FTPPORT) with curl - (built IPv4-only) didn't work. + (built ipv4-only) didn't work. Daniel (18 January 2006) - As reported in bug #1408742 (http://curl.haxx.se/bug/view.cgi?id=1408742), @@ -7557,7 +7557,7 @@ Daniel (29 March 2005) Daniel (16 March 2005) - Tru64 and some IRIX boxes seem to not like test 237 as it is. Their inet_addr() functions seems to use &255 on all numericals in a ipv4 dotted - address which makes a different failure... Now I've modified the IPv4 + address which makes a different failure... Now I've modified the ipv4 resolve code to use inet_pton() instead in an attempt to make these systems better detect this as a bad IP address rather than creating a toally bogus address that is then passed on and used. @@ -7750,7 +7750,7 @@ Daniel (7 February 2005) Daniel (5 February 2005) - Eric Vergnaud found a use of an uninitialised variable in the ftp when doing - PORT on IPv6-enabled hosts. + PORT on ipv6-enabled hosts. - David Byron pointed out we could use BUFSIZE to read data (in lib/transfer.c) instead of using BUFSIZE -1. @@ -7822,7 +7822,7 @@ Daniel (28 January 2005) 8. fetch a URL from the same server as before (re-using the connection) - Stephen More pointed out that CURLOPT_FTPPORT and the -P option didn't work - when built IPv6-enabled. I've now made a fix for it. Writing test cases for + when built ipv6-enabled. I've now made a fix for it. Writing test cases for custom port hosts turned too tricky so unfortunately there's none. Daniel (25 January 2005) @@ -8560,9 +8560,9 @@ Daniel (20 August 2004) byte file is downloaded. Daniel (18 August 2004) -- Ling Thio pointed out that when libcurl is built IPv6-enabled, it still did +- Ling Thio pointed out that when libcurl is built ipv6-enabled, it still did reverse DNS lookups when fed with a numerical IP-address (like - http://127.0.0.1/), although it doesn't when built IPv6-disabled. libcurl + http://127.0.0.1/), although it doesn't when built ipv6-disabled. libcurl should never do reverse lookups. Daniel (17 August 2004) @@ -8714,7 +8714,7 @@ Daniel (27 June 2004) Daniel (24 June 2004) - The standard curl_version() string now only includes version info about involved libraries and not about particular features. Thus it will no longer - include info about IPv6 nor GSS. That info is of course still available in + include info about ipv6 nor GSS. That info is of course still available in the feature bitmask curl_version_info() offers. - Replaced all occurances of sprintf() with snprintf(). This is mostly because @@ -8729,8 +8729,8 @@ Daniel (24 June 2004) Internally, this means amongst other things that we can stop doing the weird "increase buffer size until it works" trick when resolving hosts on - IPv4-only with gethostbyname_r(), we support socks even on libcurls built - with IPv6 enabled (but only to socks servers that resolve to an IPv4 + ipv4-only with gethostbyname_r(), we support socks even on libcurls built + with ipv6 enabled (but only to socks servers that resolve to an ipv4 address) and we no longer deep-copy or relocate hostent structs (we create Curl_addrinfo chains instead). @@ -9074,7 +9074,7 @@ Daniel (27 April 2004) and proxy name to the ACE encoded version to use internally for resolves and cookies etc. They are now using one 'struct hostname' each that keep both the original name and the possibly encoded name. IDN resolves work for me - now using IPv6, IPv4 and ares resolving. Even cookies on IDN sites seem to + now using ipv6, ipv4 and ares resolving. Even cookies on IDN sites seem to do right. I got some failures at first when CHARSET wasn't set at all which confused libidn completely and it decided by encoding of choice was 'ANSI_X3.4-1968'... @@ -9115,7 +9115,7 @@ Daniel (25 April 2004) CURLRES_ARES - is defined if libcurl is built to use c-ares for asynchronous name resolves. It cannot have ENABLE_IPV6 defined at the same time, as - c-ares has no IPv6 support. This can be Windows or *nix. + c-ares has no ipv6 support. This can be Windows or *nix. CURLRES_THREADED - is defined if libcurl is built to run under (native) Windows, and then the name resolve will be done in a new thread, and the @@ -9132,8 +9132,8 @@ Daniel (25 April 2004) hostsyn.c - functions for synchronous name resolves hostares.c - functions for ares-using name resolves hostthre.c - functions for threaded name resolves - hostip4.c - IPv4 specific functions - hostip6.c - IPv6 specific functions + hostip4.c - ipv4-specific functions + hostip6.c - ipv6-specific functions The hostip.h is the single united header file for all this. It defines the CURLRES_* defines based on the config*.h and setup.h defines. @@ -9225,7 +9225,7 @@ Daniel (15 April 2004) for the typical (not very deep) case. Daniel (14 April 2004) -- Asking for CURL_IPRESOLVE_V6 when IPv6 addresses can't be resolved will +- Asking for CURL_IPRESOLVE_V6 when ipv6 addresses can't be resolved will now cause the resolve function to return NULL immediately. This flaw was pointed out by Gisle Vanem. @@ -9380,7 +9380,7 @@ Daniel (29 March 2004) - The postit2.c source example used the wrong struct name for the post data. Daniel (26 March 2004) -- Gisle Vanem improved IPv6 support on Windows by making the curl build use +- Gisle Vanem improved ipv6 support on windows by making the curl build to use the correct getaddrinfo() function. Daniel (25 March 2004) @@ -9673,7 +9673,7 @@ Daniel (16 February 2004) and re-use that same handle during the entire curl handle's life-time. It improves performance. -- Fixed a problem when displaying verbose for IPv6-enabled libcurls and +- Fixed a problem when displaying verbose for ipv6-enabled libcurls and re-used connections. Problem reported and fix verified by Grigory Entin. - Jeff Lawson fixed the version-check in the SOCKS5 code. @@ -9725,7 +9725,7 @@ Daniel (9 February 2004) - Tor Arntsen provided a patch that makes libcurl work-around a bug in the AIX5 implementation of getaddrinfo(). This makes the FTP PORT stuff work on - IPv6-enabled AIX builds. + ipv6-enabled AIX builds. - Ken Rastatter provided portability fixes for the curlgtk.c example, and now it runs on windows with GTK as well! @@ -9754,7 +9754,7 @@ Daniel (5 February 2004) verifies this functionality. - Tor Arntsen fixed a weird getaddrinfo() usage in the FTP code, preventing - the IPv6-code for PORT work on AIX 5.2. We now also provide (better) error + the ipv6-code for PORT work on AIX 5.2. We now also provide (better) error messages when bailing out in the that function. - Tor Arntsen now provides AIX and IRIX (using gcc, xlc and the MIPSPro @@ -10133,10 +10133,10 @@ Daniel (13 November) possibly other platforms too. - Peter Sylvester identified a problem in the connect code, which made the - multi interface on a IPv6-enabled Solaris box do bad. Test case 504 to be + multi interface on a ipv6-enabled solaris box do bad. Test case 504 to be specific. I've spent some time to clean-up the Curl_connecthost() function - now to use less duplicated code for the two different sections: IPv6 and - IPv4. + now to use less duplicated code for the two different sections: ipv6 and + ipv4. Daniel (11 November) - Added CURLOPT_NETRC_FILE. Use this to tell libcurl which file to use instead @@ -10234,7 +10234,7 @@ Daniel (29 October) Daniel (28 October) - Dan C tracked down yet another weird behavior in the glibc gethostbyname_r() function for some specific versions (reported on 2.2.5 and 2.1.1), and - provided a fix. On Linux machines with these glibc versions, non-IPv6 + provided a fix. On Linux machines with these glibc versions, non-ipv6 builds of libcurl would often fail to resolve perfectly resolvable host names. @@ -10353,7 +10353,7 @@ Version 7.10.8-pre3 (8 October 2003) Daniel (8 October) - Frank Ticheler provided a patch that fixes how libcurl connects to multiple - addresses, if one of them fails (IPv4 code). + addresses, if one of them fails (ipv4-code). Daniel (7 October) - Neil Dunbar provided a patch that now makes libcurl check SSL @@ -11865,7 +11865,7 @@ Daniel (30 Sep 2002) updated the man page accordingly. - Cris Bailiff found out that the pre-releases crashed on name lookups on - names such as "a:" or "baz:" (on Linux versions not being IPv6-enabled) due + names such as "a:" or "baz:" (on Linux versions not being ipv6-enabled) due to some weird return codes from gethostbyname_r(). I'll blame the complete lack of docs in that department. Cris provided a fix, which I modified only slightly. @@ -17598,7 +17598,7 @@ Version 4.8.4 - As Julian Romero Nieto reported, curl reported wrong version number. - As Teemu Yli-Elsila pointed out, the win32 version of 4.8 (and probably all other versions for win32) didn't work with binary files since I'm too used - to the Unix style fopen() where binary and text don't differ... + to the UNIX style fopen() where binary and text don't differ... - Ralph Beckmann brought me some changes that lets curl compile error and warning free with -Wall -pedantic with g++. I also took the opportunity to clean off some unused variables and similar. @@ -17851,7 +17851,7 @@ Version 2.7 rewrite the former -l kludge in an external script that'll use urlget to fetch multipart files like that. - '-f' is introduced, it means Fail without output in case of HTTP server - errors (return code >=400). + errors (return code >=300). - Added support for -r, ranges. Specify which part of a document you want, and only that part is returned. Only with HTTP/1.1-servers. - Split up the source in 3 parts. Now all pure URL functions are in diff --git a/CMake/CurlCheckCSourceCompiles.cmake b/CMake/CurlCheckCSourceCompiles.cmake new file mode 100644 index 0000000..b632768 --- /dev/null +++ b/CMake/CurlCheckCSourceCompiles.cmake @@ -0,0 +1,75 @@ +# - Check if the source code provided in the SOURCE argument compiles. +# CURL_CHECK_C_SOURCE_COMPILES(SOURCE VAR) +# - macro which checks if the source code compiles +# SOURCE - source code to try to compile +# VAR - variable to store whether the source code compiled +# +# The following variables may be set before calling this macro to +# modify the way the check is run: +# +# CMAKE_REQUIRED_FLAGS = string of compile command line flags +# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) +# CMAKE_REQUIRED_INCLUDES = list of include directories +# CMAKE_REQUIRED_LIBRARIES = list of libraries to link + +macro(CURL_CHECK_C_SOURCE_COMPILES SOURCE VAR) + if("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN") + set(message "${VAR}") + # If the number of arguments is greater than 2 (SOURCE VAR) + if(${ARGC} GREATER 2) + # then add the third argument as a message + set(message "${ARGV2} (${VAR})") + endif(${ARGC} GREATER 2) + set(MACRO_CHECK_FUNCTION_DEFINITIONS + "-D${VAR} ${CMAKE_REQUIRED_FLAGS}") + if(CMAKE_REQUIRED_LIBRARIES) + set(CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES + "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") + else(CMAKE_REQUIRED_LIBRARIES) + set(CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES) + endif(CMAKE_REQUIRED_LIBRARIES) + if(CMAKE_REQUIRED_INCLUDES) + set(CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES + "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}") + else(CMAKE_REQUIRED_INCLUDES) + set(CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES) + endif(CMAKE_REQUIRED_INCLUDES) + set(src "") + foreach(def ${EXTRA_DEFINES}) + set(src "${src}#define ${def} 1\n") + endforeach(def) + foreach(inc ${HEADER_INCLUDES}) + set(src "${src}#include <${inc}>\n") + endforeach(inc) + + set(src "${src}\nint main() { ${SOURCE} ; return 0; }") + set(CMAKE_CONFIGURABLE_FILE_CONTENT "${src}") + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CMake/CMakeConfigurableFile.in + "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c" + IMMEDIATE) + message(STATUS "Performing Test ${message}") + try_compile(${VAR} + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c + COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} + CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS} + "${CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}" + "${CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}" + OUTPUT_VARIABLE OUTPUT) + if(${VAR}) + set(${VAR} 1 CACHE INTERNAL "Test ${message}") + message(STATUS "Performing Test ${message} - Success") + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Performing C SOURCE FILE Test ${message} succeded with the following output:\n" + "${OUTPUT}\n" + "Source file was:\n${src}\n") + else(${VAR}) + message(STATUS "Performing Test ${message} - Failed") + set(${VAR} "" CACHE INTERNAL "Test ${message}") + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Performing C SOURCE FILE Test ${message} failed with the following output:\n" + "${OUTPUT}\n" + "Source file was:\n${src}\n") + endif(${VAR}) + endif("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN") +endmacro(CURL_CHECK_C_SOURCE_COMPILES) diff --git a/CMake/CurlCheckCSourceRuns.cmake b/CMake/CurlCheckCSourceRuns.cmake new file mode 100644 index 0000000..6b14af8 --- /dev/null +++ b/CMake/CurlCheckCSourceRuns.cmake @@ -0,0 +1,83 @@ +# - Check if the source code provided in the SOURCE argument compiles and runs. +# CURL_CHECK_C_SOURCE_RUNS(SOURCE VAR) +# - macro which checks if the source code runs +# SOURCE - source code to try to compile +# VAR - variable to store size if the type exists. +# +# The following variables may be set before calling this macro to +# modify the way the check is run: +# +# CMAKE_REQUIRED_FLAGS = string of compile command line flags +# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) +# CMAKE_REQUIRED_INCLUDES = list of include directories +# CMAKE_REQUIRED_LIBRARIES = list of libraries to link + +macro(CURL_CHECK_C_SOURCE_RUNS SOURCE VAR) + if("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN") + set(message "${VAR}") + # If the number of arguments is greater than 2 (SOURCE VAR) + if(${ARGC} GREATER 2) + # then add the third argument as a message + set(message "${ARGV2} (${VAR})") + endif(${ARGC} GREATER 2) + set(MACRO_CHECK_FUNCTION_DEFINITIONS + "-D${VAR} ${CMAKE_REQUIRED_FLAGS}") + if(CMAKE_REQUIRED_LIBRARIES) + set(CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES + "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") + else(CMAKE_REQUIRED_LIBRARIES) + set(CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES) + endif(CMAKE_REQUIRED_LIBRARIES) + if(CMAKE_REQUIRED_INCLUDES) + set(CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES + "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}") + else(CMAKE_REQUIRED_INCLUDES) + set(CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES) + endif(CMAKE_REQUIRED_INCLUDES) + set(src "") + foreach(def ${EXTRA_DEFINES}) + set(src "${src}#define ${def} 1\n") + endforeach(def) + foreach(inc ${HEADER_INCLUDES}) + set(src "${src}#include <${inc}>\n") + endforeach(inc) + + set(src "${src}\nint main() { ${SOURCE} ; return 0; }") + set(CMAKE_CONFIGURABLE_FILE_CONTENT "${src}") + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CMake/CMakeConfigurableFile.in + "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c" + IMMEDIATE) + message(STATUS "Performing Test ${message}") + try_run(${VAR} ${VAR}_COMPILED + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c + COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} + CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS} + "${CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}" + "${CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}" + OUTPUT_VARIABLE OUTPUT) + # if it did not compile make the return value fail code of 1 + if(NOT ${VAR}_COMPILED) + set(${VAR} 1) + endif(NOT ${VAR}_COMPILED) + # if the return value was 0 then it worked + set(result_var ${${VAR}}) + if("${result_var}" EQUAL 0) + set(${VAR} 1 CACHE INTERNAL "Test ${message}") + message(STATUS "Performing Test ${message} - Success") + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Performing C SOURCE FILE Test ${message} succeded with the following output:\n" + "${OUTPUT}\n" + "Return value: ${${VAR}}\n" + "Source file was:\n${src}\n") + else("${result_var}" EQUAL 0) + message(STATUS "Performing Test ${message} - Failed") + set(${VAR} "" CACHE INTERNAL "Test ${message}") + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Performing C SOURCE FILE Test ${message} failed with the following output:\n" + "${OUTPUT}\n" + "Return value: ${result_var}\n" + "Source file was:\n${src}\n") + endif("${result_var}" EQUAL 0) + endif("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN") +endmacro(CURL_CHECK_C_SOURCE_RUNS) diff --git a/CMake/CurlTests.c b/CMake/CurlTests.c index 04d5e7e..199871a 100644 --- a/CMake/CurlTests.c +++ b/CMake/CurlTests.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2011, Daniel Stenberg, , 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,88 +71,264 @@ main () } #endif -/* tests for gethostbyaddr_r or gethostbyname_r */ -#if defined(HAVE_GETHOSTBYADDR_R_5_REENTRANT) || \ - defined(HAVE_GETHOSTBYADDR_R_7_REENTRANT) || \ - defined(HAVE_GETHOSTBYADDR_R_8_REENTRANT) || \ - defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT) || \ - defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT) || \ - defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT) -# define _REENTRANT - /* no idea whether _REENTRANT is always set, just invent a new flag */ -# define TEST_GETHOSTBYFOO_REENTRANT -#endif -#if defined(HAVE_GETHOSTBYADDR_R_5) || \ - defined(HAVE_GETHOSTBYADDR_R_7) || \ - defined(HAVE_GETHOSTBYADDR_R_8) || \ - defined(HAVE_GETHOSTBYNAME_R_3) || \ - defined(HAVE_GETHOSTBYNAME_R_5) || \ - defined(HAVE_GETHOSTBYNAME_R_6) || \ - defined(TEST_GETHOSTBYFOO_REENTRANT) +#ifdef HAVE_GETHOSTBYADDR_R_5 #include #include -int main(void) +int +main () +{ + +char * address; +int length; +int type; +struct hostent h; +struct hostent_data hdata; +int rc; +#ifndef gethostbyaddr_r + (void)gethostbyaddr_r; +#endif +rc = gethostbyaddr_r(address, length, type, &h, &hdata); + ; + return 0; +} +#endif +#ifdef HAVE_GETHOSTBYADDR_R_5_REENTRANT +#define _REENTRANT +#include +#include +int +main () +{ + +char * address; +int length;q +int type; +struct hostent h; +struct hostent_data hdata; +int rc; +#ifndef gethostbyaddr_r + (void)gethostbyaddr_r; +#endif +rc = gethostbyaddr_r(address, length, type, &h, &hdata); + ; + return 0; +} +#endif +#ifdef HAVE_GETHOSTBYADDR_R_7 +#include +#include +int +main () +{ + +char * address; +int length; +int type; +struct hostent h; +char buffer[8192]; +int h_errnop; +struct hostent * hp; + +#ifndef gethostbyaddr_r + (void)gethostbyaddr_r; +#endif +hp = gethostbyaddr_r(address, length, type, &h, + buffer, 8192, &h_errnop); + ; + return 0; +} +#endif +#ifdef HAVE_GETHOSTBYADDR_R_7_REENTRANT +#define _REENTRANT +#include +#include +int +main () { - char *address = "example.com"; - int length = 0; - int type = 0; - struct hostent h; - int rc = 0; -#if defined(HAVE_GETHOSTBYADDR_R_5) || \ - defined(HAVE_GETHOSTBYADDR_R_5_REENTRANT) || \ - \ - defined(HAVE_GETHOSTBYNAME_R_3) || \ - defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT) - struct hostent_data hdata; -#elif defined(HAVE_GETHOSTBYADDR_R_7) || \ - defined(HAVE_GETHOSTBYADDR_R_7_REENTRANT) || \ - defined(HAVE_GETHOSTBYADDR_R_8) || \ - defined(HAVE_GETHOSTBYADDR_R_8_REENTRANT) || \ - \ - defined(HAVE_GETHOSTBYNAME_R_5) || \ - defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT) || \ - defined(HAVE_GETHOSTBYNAME_R_6) || \ - defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT) - char buffer[8192]; - int h_errnop; - struct hostent *hp; + +char * address; +int length; +int type; +struct hostent h; +char buffer[8192]; +int h_errnop; +struct hostent * hp; + +#ifndef gethostbyaddr_r + (void)gethostbyaddr_r; +#endif +hp = gethostbyaddr_r(address, length, type, &h, + buffer, 8192, &h_errnop); + ; + return 0; +} #endif +#ifdef HAVE_GETHOSTBYADDR_R_8 +#include +#include +int +main () +{ + +char * address; +int length; +int type; +struct hostent h; +char buffer[8192]; +int h_errnop; +struct hostent * hp; +int rc; + +#ifndef gethostbyaddr_r + (void)gethostbyaddr_r; +#endif +rc = gethostbyaddr_r(address, length, type, &h, + buffer, 8192, &hp, &h_errnop); + ; + return 0; +} +#endif +#ifdef HAVE_GETHOSTBYADDR_R_8_REENTRANT +#define _REENTRANT +#include +#include +int +main () +{ + +char * address; +int length; +int type; +struct hostent h; +char buffer[8192]; +int h_errnop; +struct hostent * hp; +int rc; #ifndef gethostbyaddr_r (void)gethostbyaddr_r; #endif +rc = gethostbyaddr_r(address, length, type, &h, + buffer, 8192, &hp, &h_errnop); + ; + return 0; +} +#endif +#ifdef HAVE_GETHOSTBYNAME_R_3 +#include +#include +#include +#undef NULL +#define NULL (void *)0 + +int +main () +{ + +struct hostent_data data; +#ifndef gethostbyname_r + (void)gethostbyname_r; +#endif +gethostbyname_r(NULL, NULL, NULL); + ; + return 0; +} +#endif +#ifdef HAVE_GETHOSTBYNAME_R_3_REENTRANT +#define _REENTRANT +#include +#include +#include +#undef NULL +#define NULL (void *)0 + +int +main () +{ + +struct hostent_data data; +#ifndef gethostbyname_r + (void)gethostbyname_r; +#endif +gethostbyname_r(NULL, NULL, NULL); + ; + return 0; +} +#endif +#ifdef HAVE_GETHOSTBYNAME_R_5 +#include +#include +#include +#undef NULL +#define NULL (void *)0 + +int +main () +{ +#ifndef gethostbyname_r + (void)gethostbyname_r; +#endif +gethostbyname_r(NULL, NULL, NULL, 0, NULL); + ; + return 0; +} +#endif +#ifdef HAVE_GETHOSTBYNAME_R_5_REENTRANT +#define _REENTRANT +#include +#include +#undef NULL +#define NULL (void *)0 -#if defined(HAVE_GETHOSTBYADDR_R_5) || \ - defined(HAVE_GETHOSTBYADDR_R_5_REENTRANT) - rc = gethostbyaddr_r(address, length, type, &h, &hdata); -#elif defined(HAVE_GETHOSTBYADDR_R_7) || \ - defined(HAVE_GETHOSTBYADDR_R_7_REENTRANT) - hp = gethostbyaddr_r(address, length, type, &h, buffer, 8192, &h_errnop); - (void)hp; -#elif defined(HAVE_GETHOSTBYADDR_R_8) || \ - defined(HAVE_GETHOSTBYADDR_R_8_REENTRANT) - rc = gethostbyaddr_r(address, length, type, &h, buffer, 8192, &hp, &h_errnop); -#endif - -#if defined(HAVE_GETHOSTBYNAME_R_3) || \ - defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT) - rc = gethostbyname_r(address, &h, &hdata); -#elif defined(HAVE_GETHOSTBYNAME_R_5) || \ - defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT) - rc = gethostbyname_r(address, &h, buffer, 8192, 0, &h_errnop); - (void)hp; /* not used for test */ -#elif defined(HAVE_GETHOSTBYNAME_R_6) || \ - defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT) - rc = gethostbyname_r(address, &h, buffer, 8192, &hp, &h_errnop); -#endif - - (void)length; - (void)type; - (void)rc; +int +main () +{ + +#ifndef gethostbyname_r + (void)gethostbyname_r; +#endif +gethostbyname_r(NULL, NULL, NULL, 0, NULL); + ; return 0; } #endif +#ifdef HAVE_GETHOSTBYNAME_R_6 +#include +#include +#undef NULL +#define NULL (void *)0 + +int +main () +{ +#ifndef gethostbyname_r + (void)gethostbyname_r; +#endif +gethostbyname_r(NULL, NULL, NULL, 0, NULL, NULL); + ; + return 0; +} +#endif +#ifdef HAVE_GETHOSTBYNAME_R_6_REENTRANT +#define _REENTRANT +#include +#include +#undef NULL +#define NULL (void *)0 + +int +main () +{ + +#ifndef gethostbyname_r + (void)gethostbyname_r; +#endif +gethostbyname_r(NULL, NULL, NULL, 0, NULL, NULL); + ; + return 0; +} +#endif #ifdef HAVE_SOCKLEN_T #ifdef _WIN32 #include diff --git a/CMake/FindGSS.cmake b/CMake/FindGSS.cmake deleted file mode 100644 index 4986a8e..0000000 --- a/CMake/FindGSS.cmake +++ /dev/null @@ -1,289 +0,0 @@ -# - Try to find the GSS Kerberos library -# Once done this will define -# -# GSS_ROOT_DIR - Set this variable to the root installation of GSS -# -# Read-Only variables: -# GSS_FOUND - system has the Heimdal library -# GSS_FLAVOUR - "MIT" or "Heimdal" if anything found. -# GSS_INCLUDE_DIR - the Heimdal include directory -# GSS_LIBRARIES - The libraries needed to use GSS -# GSS_LINK_DIRECTORIES - Directories to add to linker search path -# 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" - -set(_MIT_MODNAME mit-krb5-gssapi) -set(_HEIMDAL_MODNAME heimdal-gssapi) - -include(CheckIncludeFile) -include(CheckIncludeFiles) -include(CheckTypeSize) - -set(_GSS_ROOT_HINTS - "${GSS_ROOT_DIR}" - "$ENV{GSS_ROOT_DIR}" -) - -# try to find library using system pkg-config if user didn't specify root dir -if(NOT GSS_ROOT_DIR AND NOT "$ENV{GSS_ROOT_DIR}") - if(UNIX) - find_package(PkgConfig QUIET) - pkg_search_module(_GSS_PKG ${_MIT_MODNAME} ${_HEIMDAL_MODNAME}) - list(APPEND _GSS_ROOT_HINTS "${_GSS_PKG_PREFIX}") - elseif(WIN32) - list(APPEND _GSS_ROOT_HINTS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MIT\\Kerberos;InstallDir]") - endif() -endif() - -if(NOT _GSS_FOUND) #not found by pkg-config. Let's take more traditional approach. - find_file(_GSS_CONFIGURE_SCRIPT - NAMES - "krb5-config" - HINTS - ${_GSS_ROOT_HINTS} - PATH_SUFFIXES - bin - NO_CMAKE_PATH - NO_CMAKE_ENVIRONMENT_PATH - ) - - # if not found in user-supplied directories, maybe system knows better - find_file(_GSS_CONFIGURE_SCRIPT - NAMES - "krb5-config" - PATH_SUFFIXES - bin - ) - - if(_GSS_CONFIGURE_SCRIPT) - execute_process( - COMMAND ${_GSS_CONFIGURE_SCRIPT} "--cflags" "gssapi" - OUTPUT_VARIABLE _GSS_CFLAGS - RESULT_VARIABLE _GSS_CONFIGURE_FAILED - ) -message(STATUS "CFLAGS: ${_GSS_CFLAGS}") - if(NOT _GSS_CONFIGURE_FAILED) # 0 means success - # should also work in an odd case when multiple directories are given - string(STRIP "${_GSS_CFLAGS}" _GSS_CFLAGS) - string(REGEX REPLACE " +-I" ";" _GSS_CFLAGS "${_GSS_CFLAGS}") - string(REGEX REPLACE " +-([^I][^ \\t;]*)" ";-\\1"_GSS_CFLAGS "${_GSS_CFLAGS}") - - foreach(_flag ${_GSS_CFLAGS}) - if(_flag MATCHES "^-I.*") - string(REGEX REPLACE "^-I" "" _val "${_flag}") - list(APPEND _GSS_INCLUDE_DIR "${_val}") - else() - list(APPEND _GSS_COMPILER_FLAGS "${_flag}") - endif() - endforeach() - endif() - - execute_process( - COMMAND ${_GSS_CONFIGURE_SCRIPT} "--libs" "gssapi" - OUTPUT_VARIABLE _GSS_LIB_FLAGS - RESULT_VARIABLE _GSS_CONFIGURE_FAILED - ) -message(STATUS "LDFLAGS: ${_GSS_LIB_FLAGS}") - if(NOT _GSS_CONFIGURE_FAILED) # 0 means success - # this script gives us libraries and link directories. Blah. We have to deal with it. - string(STRIP "${_GSS_LIB_FLAGS}" _GSS_LIB_FLAGS) - string(REGEX REPLACE " +-(L|l)" ";-\\1" _GSS_LIB_FLAGS "${_GSS_LIB_FLAGS}") - string(REGEX REPLACE " +-([^Ll][^ \\t;]*)" ";-\\1"_GSS_LIB_FLAGS "${_GSS_LIB_FLAGS}") - - foreach(_flag ${_GSS_LIB_FLAGS}) - if(_flag MATCHES "^-l.*") - string(REGEX REPLACE "^-l" "" _val "${_flag}") - list(APPEND _GSS_LIBRARIES "${_val}") - elseif(_flag MATCHES "^-L.*") - string(REGEX REPLACE "^-L" "" _val "${_flag}") - list(APPEND _GSS_LINK_DIRECTORIES "${_val}") - else() - list(APPEND _GSS_LINKER_FLAGS "${_flag}") - endif() - endforeach() - endif() - - - execute_process( - COMMAND ${_GSS_CONFIGURE_SCRIPT} "--version" - OUTPUT_VARIABLE _GSS_VERSION - RESULT_VARIABLE _GSS_CONFIGURE_FAILED - ) - - # older versions may not have the "--version" parameter. In this case we just don't care. - if(_GSS_CONFIGURE_FAILED) - set(_GSS_VERSION 0) - endif() - - - execute_process( - COMMAND ${_GSS_CONFIGURE_SCRIPT} "--vendor" - OUTPUT_VARIABLE _GSS_VENDOR - RESULT_VARIABLE _GSS_CONFIGURE_FAILED - ) - - # older versions may not have the "--vendor" parameter. In this case we just don't care. - if(_GSS_CONFIGURE_FAILED) - set(GSS_FLAVOUR "Heimdal") # most probably, shouldn't really matter - else() - if(_GSS_VENDOR MATCHES ".*H|heimdal.*") - set(GSS_FLAVOUR "Heimdal") - else() - set(GSS_FLAVOUR "MIT") - endif() - endif() - - else() # either there is no config script or we are on platform that doesn't provide one (Windows?) - - find_path(_GSS_INCLUDE_DIR - NAMES - "gssapi/gssapi.h" - HINTS - ${_GSS_ROOT_HINTS} - PATH_SUFFIXES - include - inc - ) - - if(_GSS_INCLUDE_DIR) #jay, we've found something - set(CMAKE_REQUIRED_INCLUDES "${_GSS_INCLUDE_DIR}") - check_include_files( "gssapi/gssapi_generic.h;gssapi/gssapi_krb5.h" _GSS_HAVE_MIT_HEADERS) - - if(_GSS_HAVE_MIT_HEADERS) - set(GSS_FLAVOUR "MIT") - else() - # prevent compiling the header - just check if we can include it - set(CMAKE_REQUIRED_DEFINITIONS "-D__ROKEN_H__") - check_include_file( "roken.h" _GSS_HAVE_ROKEN_H) - - check_include_file( "heimdal/roken.h" _GSS_HAVE_HEIMDAL_ROKEN_H) - if(_GSS_HAVE_ROKEN_H OR _GSS_HAVE_HEIMDAL_ROKEN_H) - set(GSS_FLAVOUR "Heimdal") - endif() - set(CMAKE_REQUIRED_DEFINITIONS "") - endif() - else() - # I'm not convienced if this is the right way but this is what autotools do at the moment - find_path(_GSS_INCLUDE_DIR - NAMES - "gssapi.h" - HINTS - ${_GSS_ROOT_HINTS} - PATH_SUFFIXES - include - inc - ) - - if(_GSS_INCLUDE_DIR) - set(GSS_FLAVOUR "Heimdal") - endif() - endif() - - # if we have headers, check if we can link libraries - if(GSS_FLAVOUR) - set(_GSS_LIBDIR_SUFFIXES "") - set(_GSS_LIBDIR_HINTS ${_GSS_ROOT_HINTS}) - get_filename_component(_GSS_CALCULATED_POTENTIAL_ROOT "${_GSS_INCLUDE_DIR}" PATH) - list(APPEND _GSS_LIBDIR_HINTS ${_GSS_CALCULATED_POTENTIAL_ROOT}) - - if(WIN32) - if(CMAKE_SIZEOF_VOID_P EQUAL 8) - list(APPEND _GSS_LIBDIR_SUFFIXES "lib/AMD64") - if(GSS_FLAVOUR STREQUAL "MIT") - set(_GSS_LIBNAME "gssapi64") - else() - set(_GSS_LIBNAME "libgssapi") - endif() - else() - list(APPEND _GSS_LIBDIR_SUFFIXES "lib/i386") - if(GSS_FLAVOUR STREQUAL "MIT") - set(_GSS_LIBNAME "gssapi32") - else() - set(_GSS_LIBNAME "libgssapi") - endif() - endif() - else() - list(APPEND _GSS_LIBDIR_SUFFIXES "lib;lib64") # those suffixes are not checked for HINTS - if(GSS_FLAVOUR STREQUAL "MIT") - set(_GSS_LIBNAME "gssapi_krb5") - else() - set(_GSS_LIBNAME "gssapi") - endif() - endif() - - find_library(_GSS_LIBRARIES - NAMES - ${_GSS_LIBNAME} - HINTS - ${_GSS_LIBDIR_HINTS} - PATH_SUFFIXES - ${_GSS_LIBDIR_SUFFIXES} - ) - - endif() - - endif() -else() - if(_GSS_PKG_${_MIT_MODNAME}_VERSION) - set(GSS_FLAVOUR "MIT") - set(_GSS_VERSION _GSS_PKG_${_MIT_MODNAME}_VERSION) - else() - set(GSS_FLAVOUR "Heimdal") - set(_GSS_VERSION _GSS_PKG_${_MIT_HEIMDAL}_VERSION) - endif() -endif() - -set(GSS_INCLUDE_DIR ${_GSS_INCLUDE_DIR}) -set(GSS_LIBRARIES ${_GSS_LIBRARIES}) -set(GSS_LINK_DIRECTORIES ${_GSS_LINK_DIRECTORIES}) -set(GSS_LINKER_FLAGS ${_GSS_LINKER_FLAGS}) -set(GSS_COMPILER_FLAGS ${_GSS_COMPILER_FLAGS}) -set(GSS_VERSION ${_GSS_VERSION}) - -if(GSS_FLAVOUR) - - if(NOT GSS_VERSION AND GSS_FLAVOUR STREQUAL "Heimdal") - if(CMAKE_SIZEOF_VOID_P EQUAL 8) - set(HEIMDAL_MANIFEST_FILE "Heimdal.Application.amd64.manifest") - else() - set(HEIMDAL_MANIFEST_FILE "Heimdal.Application.x86.manifest") - endif() - - if(EXISTS "${GSS_INCLUDE_DIR}/${HEIMDAL_MANIFEST_FILE}") - file(STRINGS "${GSS_INCLUDE_DIR}/${HEIMDAL_MANIFEST_FILE}" heimdal_version_str - REGEX "^.*version=\"[0-9]\\.[^\"]+\".*$") - - string(REGEX MATCH "[0-9]\\.[^\"]+" - GSS_VERSION "${heimdal_version_str}") - endif() - - if(NOT GSS_VERSION) - set(GSS_VERSION "Heimdal Unknown") - endif() - elseif(NOT GSS_VERSION AND GSS_FLAVOUR STREQUAL "MIT") - get_filename_component(_MIT_VERSION "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MIT\\Kerberos\\SDK\\CurrentVersion;VersionString]" NAME CACHE) - if(WIN32 AND _MIT_VERSION) - set(GSS_VERSION "${_MIT_VERSION}") - else() - set(GSS_VERSION "MIT Unknown") - endif() - endif() -endif() - - -include(FindPackageHandleStandardArgs) - -set(_GSS_REQUIRED_VARS GSS_LIBRARIES GSS_FLAVOUR) - -find_package_handle_standard_args(GSS - REQUIRED_VARS - ${_GSS_REQUIRED_VARS} - VERSION_VAR - GSS_VERSION - FAIL_MESSAGE - "Could NOT find GSS, try to set the path to GSS root folder in the system variable GSS_ROOT_DIR" -) - -mark_as_advanced(GSS_INCLUDE_DIR GSS_LIBRARIES) diff --git a/CMake/FindLibSSH2.cmake b/CMake/FindLibSSH2.cmake deleted file mode 100644 index 12a7c61..0000000 --- a/CMake/FindLibSSH2.cmake +++ /dev/null @@ -1,35 +0,0 @@ -# - Try to find the libssh2 library -# Once done this will define -# -# LIBSSH2_FOUND - system has the libssh2 library -# LIBSSH2_INCLUDE_DIR - the libssh2 include directory -# LIBSSH2_LIBRARY - the libssh2 library name - -if (LIBSSH2_INCLUDE_DIR AND LIBSSH2_LIBRARY) - set(LibSSH2_FIND_QUIETLY TRUE) -endif (LIBSSH2_INCLUDE_DIR AND LIBSSH2_LIBRARY) - -FIND_PATH(LIBSSH2_INCLUDE_DIR libssh2.h -) - -FIND_LIBRARY(LIBSSH2_LIBRARY NAMES ssh2 -) - -if(LIBSSH2_INCLUDE_DIR) - file(STRINGS "${LIBSSH2_INCLUDE_DIR}/libssh2.h" libssh2_version_str REGEX "^#define[\t ]+LIBSSH2_VERSION_NUM[\t ]+0x[0-9][0-9][0-9][0-9][0-9][0-9].*") - - string(REGEX REPLACE "^.*LIBSSH2_VERSION_NUM[\t ]+0x([0-9][0-9]).*$" "\\1" LIBSSH2_VERSION_MAJOR "${libssh2_version_str}") - string(REGEX REPLACE "^.*LIBSSH2_VERSION_NUM[\t ]+0x[0-9][0-9]([0-9][0-9]).*$" "\\1" LIBSSH2_VERSION_MINOR "${libssh2_version_str}") - string(REGEX REPLACE "^.*LIBSSH2_VERSION_NUM[\t ]+0x[0-9][0-9][0-9][0-9]([0-9][0-9]).*$" "\\1" LIBSSH2_VERSION_PATCH "${libssh2_version_str}") - - string(REGEX REPLACE "^0(.+)" "\\1" LIBSSH2_VERSION_MAJOR "${LIBSSH2_VERSION_MAJOR}") - string(REGEX REPLACE "^0(.+)" "\\1" LIBSSH2_VERSION_MINOR "${LIBSSH2_VERSION_MINOR}") - string(REGEX REPLACE "^0(.+)" "\\1" LIBSSH2_VERSION_PATCH "${LIBSSH2_VERSION_PATCH}") - - set(LIBSSH2_VERSION "${LIBSSH2_VERSION_MAJOR}.${LIBSSH2_VERSION_MINOR}.${LIBSSH2_VERSION_PATCH}") -endif(LIBSSH2_INCLUDE_DIR) - -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibSSH2 DEFAULT_MSG LIBSSH2_INCLUDE_DIR LIBSSH2_LIBRARY ) - -MARK_AS_ADVANCED(LIBSSH2_INCLUDE_DIR LIBSSH2_LIBRARY LIBSSH2_VERSION_MAJOR LIBSSH2_VERSION_MINOR LIBSSH2_VERSION_PATCH LIBSSH2_VERSION) diff --git a/CMake/FindOpenSSL.cmake b/CMake/FindOpenSSL.cmake new file mode 100644 index 0000000..279428b --- /dev/null +++ b/CMake/FindOpenSSL.cmake @@ -0,0 +1,21 @@ +# Extension of the standard FindOpenSSL.cmake +# Adds OPENSSL_INCLUDE_DIRS and libeay32 +include("${CMAKE_ROOT}/Modules/FindOpenSSL.cmake") + +# starting 2.8 it is better to use standard modules +if(CMAKE_MAJOR_VERSION EQUAL "2" AND CMAKE_MINOR_VERSION LESS "8") + # Bill Hoffman told that libeay32 is necessary for him: + find_library(SSL_LIBEAY NAMES libeay32) + + if(OPENSSL_FOUND) + if(SSL_LIBEAY) + list(APPEND OPENSSL_LIBRARIES ${SSL_LIBEAY}) + else() + set(OPENSSL_FOUND FALSE) + endif() + endif() +endif() # if (CMAKE_MAJOR_VERSION EQUAL "2" AND CMAKE_MINOR_VERSION LESS "8") + +if(OPENSSL_FOUND) + set(OPENSSL_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR}) +endif() diff --git a/CMake/FindZLIB.cmake b/CMake/FindZLIB.cmake new file mode 100644 index 0000000..b2cfe18 --- /dev/null +++ b/CMake/FindZLIB.cmake @@ -0,0 +1,10 @@ +# Locate zlib +include("${CMAKE_ROOT}/Modules/FindZLIB.cmake") + +# starting 2.8 it is better to use standard modules +if(CMAKE_MAJOR_VERSION EQUAL "2" AND CMAKE_MINOR_VERSION LESS "8") + find_library(ZLIB_LIBRARY_DEBUG NAMES zd zlibd zdlld zlib1d ) + if(ZLIB_FOUND AND ZLIB_LIBRARY_DEBUG) + set( ZLIB_LIBRARIES optimized "${ZLIB_LIBRARY}" debug ${ZLIB_LIBRARY_DEBUG}) + endif() +endif() diff --git a/CMake/Macros.cmake b/CMake/Macros.cmake deleted file mode 100644 index dab005f..0000000 --- a/CMake/Macros.cmake +++ /dev/null @@ -1,95 +0,0 @@ -#File defines convenience macros for available feature testing - -# This macro checks if the symbol exists in the library and if it -# does, it prepends library to the list. It is intended to be called -# multiple times with a sequence of possibly dependent libraries in -# order of least-to-most-dependent. Some libraries depend on others -# to link correctly. -macro(CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE) - check_library_exists("${LIBRARY};${CURL_LIBS}" ${SYMBOL} "${CMAKE_LIBRARY_PATH}" - ${VARIABLE}) - if(${VARIABLE}) - set(CURL_LIBS ${LIBRARY} ${CURL_LIBS}) - endif(${VARIABLE}) -endmacro(CHECK_LIBRARY_EXISTS_CONCAT) - -# Check if header file exists and add it to the list. -# This macro is intended to be called multiple times with a sequence of -# possibly dependent header files. Some headers depend on others to be -# compiled correctly. -macro(CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE) - check_include_files("${CURL_INCLUDES};${FILE}" ${VARIABLE}) - if(${VARIABLE}) - set(CURL_INCLUDES ${CURL_INCLUDES} ${FILE}) - set(CURL_TEST_DEFINES "${CURL_TEST_DEFINES} -D${VARIABLE}") - endif(${VARIABLE}) -endmacro(CHECK_INCLUDE_FILE_CONCAT) - -# For other curl specific tests, use this macro. -macro(CURL_INTERNAL_TEST CURL_TEST) - if(NOT DEFINED "${CURL_TEST}") - set(MACRO_CHECK_FUNCTION_DEFINITIONS - "-D${CURL_TEST} ${CURL_TEST_DEFINES} ${CMAKE_REQUIRED_FLAGS}") - if(CMAKE_REQUIRED_LIBRARIES) - set(CURL_TEST_ADD_LIBRARIES - "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") - endif(CMAKE_REQUIRED_LIBRARIES) - - message(STATUS "Performing Curl Test ${CURL_TEST}") - try_compile(${CURL_TEST} - ${CMAKE_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/CMake/CurlTests.c - CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS} - "${CURL_TEST_ADD_LIBRARIES}" - OUTPUT_VARIABLE OUTPUT) - if(${CURL_TEST}) - set(${CURL_TEST} 1 CACHE INTERNAL "Curl test ${FUNCTION}") - message(STATUS "Performing Curl Test ${CURL_TEST} - Success") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Performing Curl Test ${CURL_TEST} passed with the following output:\n" - "${OUTPUT}\n") - else(${CURL_TEST}) - message(STATUS "Performing Curl Test ${CURL_TEST} - Failed") - set(${CURL_TEST} "" CACHE INTERNAL "Curl test ${FUNCTION}") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Performing Curl Test ${CURL_TEST} failed with the following output:\n" - "${OUTPUT}\n") - endif(${CURL_TEST}) - endif() -endmacro(CURL_INTERNAL_TEST) - -macro(CURL_INTERNAL_TEST_RUN CURL_TEST) - if(NOT DEFINED "${CURL_TEST}_COMPILE") - set(MACRO_CHECK_FUNCTION_DEFINITIONS - "-D${CURL_TEST} ${CMAKE_REQUIRED_FLAGS}") - if(CMAKE_REQUIRED_LIBRARIES) - set(CURL_TEST_ADD_LIBRARIES - "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") - endif(CMAKE_REQUIRED_LIBRARIES) - - message(STATUS "Performing Curl Test ${CURL_TEST}") - try_run(${CURL_TEST} ${CURL_TEST}_COMPILE - ${CMAKE_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/CMake/CurlTests.c - CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS} - "${CURL_TEST_ADD_LIBRARIES}" - OUTPUT_VARIABLE OUTPUT) - if(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST}) - set(${CURL_TEST} 1 CACHE INTERNAL "Curl test ${FUNCTION}") - message(STATUS "Performing Curl Test ${CURL_TEST} - Success") - else(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST}) - message(STATUS "Performing Curl Test ${CURL_TEST} - Failed") - set(${CURL_TEST} "" CACHE INTERNAL "Curl test ${FUNCTION}") - file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log" - "Performing Curl Test ${CURL_TEST} failed with the following output:\n" - "${OUTPUT}") - if(${CURL_TEST}_COMPILE) - file(APPEND - "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log" - "There was a problem running this test\n") - endif(${CURL_TEST}_COMPILE) - file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log" - "\n\n") - endif(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST}) - endif() -endmacro(CURL_INTERNAL_TEST_RUN) diff --git a/CMake/OtherTests.cmake b/CMake/OtherTests.cmake index 4f07f22..89d0048 100644 --- a/CMake/OtherTests.cmake +++ b/CMake/OtherTests.cmake @@ -1,10 +1,15 @@ -include(CheckCSourceCompiles) -# The begin of the sources (macros and includes) -set(_source_epilogue "#undef inline") +include(CurlCheckCSourceCompiles) +set(EXTRA_DEFINES "__unused1\n#undef inline\n#define __unused2") +set(HEADER_INCLUDES) +set(headers_hack) macro(add_header_include check header) if(${check}) - set(_source_epilogue "${_source_epilogue}\n#include <${header}>") + set(headers_hack + "${headers_hack}\n#include <${header}>") + #SET(HEADER_INCLUDES + # ${HEADER_INCLUDES} + # "${header}") endif(${check}) endmacro(add_header_include) @@ -13,23 +18,22 @@ if(HAVE_WINDOWS_H) add_header_include(HAVE_WINDOWS_H "windows.h") add_header_include(HAVE_WINSOCK2_H "winsock2.h") add_header_include(HAVE_WINSOCK_H "winsock.h") - set(_source_epilogue - "${_source_epilogue}\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif") + set(EXTRA_DEFINES ${EXTRA_DEFINES} + "__unused7\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif\n#define __unused3") set(signature_call_conv "PASCAL") - if(HAVE_LIBWS2_32) - set(CMAKE_REQUIRED_LIBRARIES ws2_32) - endif() else(HAVE_WINDOWS_H) add_header_include(HAVE_SYS_TYPES_H "sys/types.h") add_header_include(HAVE_SYS_SOCKET_H "sys/socket.h") endif(HAVE_WINDOWS_H) -check_c_source_compiles("${_source_epilogue} -int main(void) { - recv(0, 0, 0, 0); - return 0; -}" curl_cv_recv) +set(EXTRA_DEFINES_BACKUP "${EXTRA_DEFINES}") +set(EXTRA_DEFINES "${EXTRA_DEFINES_BACKUP}\n${headers_hack}\n${extern_line}\n#define __unused5") +curl_check_c_source_compiles("recv(0, 0, 0, 0)" curl_cv_recv) if(curl_cv_recv) + # AC_CACHE_CHECK([types of arguments and return type for recv], + #[curl_cv_func_recv_args], [ + #SET(curl_cv_func_recv_args "unknown") + #for recv_retv in 'int' 'ssize_t'; do 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") @@ -37,23 +41,17 @@ if(curl_cv_recv) foreach(recv_arg3 "size_t" "int" "socklen_t" "unsigned int") foreach(recv_arg4 "int" "unsigned int") if(NOT curl_cv_func_recv_done) - unset(curl_cv_func_recv_test CACHE) - check_c_source_compiles(" - ${_source_epilogue} - extern ${recv_retv} ${signature_call_conv} - recv(${recv_arg1}, ${recv_arg2}, ${recv_arg3}, ${recv_arg4}); - int main(void) { + set(curl_cv_func_recv_test "UNKNOWN") + set(extern_line "extern ${recv_retv} ${signature_call_conv} recv(${recv_arg1}, ${recv_arg2}, ${recv_arg3}, ${recv_arg4})\;") + set(EXTRA_DEFINES "${EXTRA_DEFINES_BACKUP}\n${headers_hack}\n${extern_line}\n#define __unused5") + curl_check_c_source_compiles(" ${recv_arg1} s=0; ${recv_arg2} buf=0; ${recv_arg3} len=0; ${recv_arg4} flags=0; - ${recv_retv} res = recv(s, buf, len, flags); - (void) res; - return 0; - }" - curl_cv_func_recv_test) - message(STATUS - "Tested: ${recv_retv} recv(${recv_arg1}, ${recv_arg2}, ${recv_arg3}, ${recv_arg4})") + ${recv_retv} res = recv(s, buf, len, flags)" + curl_cv_func_recv_test + "${recv_retv} recv(${recv_arg1}, ${recv_arg2}, ${recv_arg3}, ${recv_arg4})") if(curl_cv_func_recv_test) set(curl_cv_func_recv_args "${recv_arg1},${recv_arg2},${recv_arg3},${recv_arg4},${recv_retv}") @@ -71,13 +69,18 @@ if(curl_cv_recv) endforeach(recv_arg2) endforeach(recv_arg1) endforeach(recv_retv) - else() + else(NOT DEFINED curl_cv_func_recv_args OR "${curl_cv_func_recv_args}" STREQUAL "unknown") string(REGEX REPLACE "^([^,]*),[^,]*,[^,]*,[^,]*,[^,]*$" "\\1" RECV_TYPE_ARG1 "${curl_cv_func_recv_args}") string(REGEX REPLACE "^[^,]*,([^,]*),[^,]*,[^,]*,[^,]*$" "\\1" RECV_TYPE_ARG2 "${curl_cv_func_recv_args}") string(REGEX REPLACE "^[^,]*,[^,]*,([^,]*),[^,]*,[^,]*$" "\\1" RECV_TYPE_ARG3 "${curl_cv_func_recv_args}") string(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,([^,]*),[^,]*$" "\\1" RECV_TYPE_ARG4 "${curl_cv_func_recv_args}") string(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,[^,]*,([^,]*)$" "\\1" RECV_TYPE_RETV "${curl_cv_func_recv_args}") - endif() + #MESSAGE("RECV_TYPE_ARG1 ${RECV_TYPE_ARG1}") + #MESSAGE("RECV_TYPE_ARG2 ${RECV_TYPE_ARG2}") + #MESSAGE("RECV_TYPE_ARG3 ${RECV_TYPE_ARG3}") + #MESSAGE("RECV_TYPE_ARG4 ${RECV_TYPE_ARG4}") + #MESSAGE("RECV_TYPE_RETV ${RECV_TYPE_RETV}") + endif(NOT DEFINED curl_cv_func_recv_args OR "${curl_cv_func_recv_args}" STREQUAL "unknown") if("${curl_cv_func_recv_args}" STREQUAL "unknown") message(FATAL_ERROR "Cannot find proper types to use for recv args") @@ -88,12 +91,12 @@ endif(curl_cv_recv) set(curl_cv_func_recv_args "${curl_cv_func_recv_args}" CACHE INTERNAL "Arguments for recv") set(HAVE_RECV 1) -check_c_source_compiles("${_source_epilogue} -int main(void) { - send(0, 0, 0, 0); - return 0; -}" curl_cv_send) +curl_check_c_source_compiles("send(0, 0, 0, 0)" curl_cv_send) if(curl_cv_send) + # AC_CACHE_CHECK([types of arguments and return type for send], + #[curl_cv_func_send_args], [ + #SET(curl_cv_func_send_args "unknown") + #for send_retv in 'int' 'ssize_t'; do 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") @@ -101,24 +104,19 @@ if(curl_cv_send) foreach(send_arg3 "size_t" "int" "socklen_t" "unsigned int") foreach(send_arg4 "int" "unsigned int") if(NOT curl_cv_func_send_done) - unset(curl_cv_func_send_test CACHE) - check_c_source_compiles(" - ${_source_epilogue} - extern ${send_retv} ${signature_call_conv} - send(${send_arg1}, ${send_arg2}, ${send_arg3}, ${send_arg4}); - int main(void) { + set(curl_cv_func_send_test "UNKNOWN") + set(extern_line "extern ${send_retv} ${signature_call_conv} send(${send_arg1}, ${send_arg2}, ${send_arg3}, ${send_arg4})\;") + set(EXTRA_DEFINES "${EXTRA_DEFINES_BACKUP}\n${headers_hack}\n${extern_line}\n#define __unused5") + curl_check_c_source_compiles(" ${send_arg1} s=0; ${send_arg2} buf=0; ${send_arg3} len=0; ${send_arg4} flags=0; - ${send_retv} res = send(s, buf, len, flags); - (void) res; - return 0; - }" - curl_cv_func_send_test) - message(STATUS - "Tested: ${send_retv} send(${send_arg1}, ${send_arg2}, ${send_arg3}, ${send_arg4})") + ${send_retv} res = send(s, buf, len, flags)" + curl_cv_func_send_test + "${send_retv} send(${send_arg1}, ${send_arg2}, ${send_arg3}, ${send_arg4})") if(curl_cv_func_send_test) + #MESSAGE("Found arguments: ${curl_cv_func_send_test}") string(REGEX REPLACE "(const) .*" "\\1" send_qual_arg2 "${send_arg2}") string(REGEX REPLACE "const (.*)" "\\1" send_arg2 "${send_arg2}") set(curl_cv_func_send_args @@ -137,14 +135,20 @@ if(curl_cv_send) endforeach(send_arg2) endforeach(send_arg1) endforeach(send_retv) - else() + else(NOT DEFINED curl_cv_func_send_args OR "${curl_cv_func_send_args}" STREQUAL "unknown") string(REGEX REPLACE "^([^,]*),[^,]*,[^,]*,[^,]*,[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG1 "${curl_cv_func_send_args}") string(REGEX REPLACE "^[^,]*,([^,]*),[^,]*,[^,]*,[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG2 "${curl_cv_func_send_args}") string(REGEX REPLACE "^[^,]*,[^,]*,([^,]*),[^,]*,[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG3 "${curl_cv_func_send_args}") string(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,([^,]*),[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG4 "${curl_cv_func_send_args}") string(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,[^,]*,([^,]*),[^,]*$" "\\1" SEND_TYPE_RETV "${curl_cv_func_send_args}") string(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,([^,]*)$" "\\1" SEND_QUAL_ARG2 "${curl_cv_func_send_args}") - endif() + #MESSAGE("SEND_TYPE_ARG1 ${SEND_TYPE_ARG1}") + #MESSAGE("SEND_TYPE_ARG2 ${SEND_TYPE_ARG2}") + #MESSAGE("SEND_TYPE_ARG3 ${SEND_TYPE_ARG3}") + #MESSAGE("SEND_TYPE_ARG4 ${SEND_TYPE_ARG4}") + #MESSAGE("SEND_TYPE_RETV ${SEND_TYPE_RETV}") + #MESSAGE("SEND_QUAL_ARG2 ${SEND_QUAL_ARG2}") + endif(NOT DEFINED curl_cv_func_send_args OR "${curl_cv_func_send_args}" STREQUAL "unknown") if("${curl_cv_func_send_args}" STREQUAL "unknown") message(FATAL_ERROR "Cannot find proper types to use for send args") @@ -156,71 +160,88 @@ endif(curl_cv_send) set(curl_cv_func_send_args "${curl_cv_func_send_args}" CACHE INTERNAL "Arguments for send") set(HAVE_SEND 1) -check_c_source_compiles("${_source_epilogue} - int main(void) { - int flag = MSG_NOSIGNAL; - (void)flag; - return 0; - }" HAVE_MSG_NOSIGNAL) +set(EXTRA_DEFINES "${EXTRA_DEFINES}\n${headers_hack}\n#define __unused5") +curl_check_c_source_compiles("int flag = MSG_NOSIGNAL" HAVE_MSG_NOSIGNAL) -if(NOT HAVE_WINDOWS_H) +set(EXTRA_DEFINES "__unused1\n#undef inline\n#define __unused2") +set(HEADER_INCLUDES) +set(headers_hack) + +macro(add_header_include check header) + if(${check}) + set(headers_hack + "${headers_hack}\n#include <${header}>") + #SET(HEADER_INCLUDES + # ${HEADER_INCLUDES} + # "${header}") + endif(${check}) +endmacro(add_header_include header) + +if(HAVE_WINDOWS_H) + set(EXTRA_DEFINES ${EXTRA_DEFINES} + "__unused7\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif\n#define __unused3") + add_header_include(HAVE_WINDOWS_H "windows.h") + add_header_include(HAVE_WINSOCK2_H "winsock2.h") + add_header_include(HAVE_WINSOCK_H "winsock.h") +else(HAVE_WINDOWS_H) + add_header_include(HAVE_SYS_TYPES_H "sys/types.h") add_header_include(HAVE_SYS_TIME_H "sys/time.h") add_header_include(TIME_WITH_SYS_TIME "time.h") add_header_include(HAVE_TIME_H "time.h") -endif() -check_c_source_compiles("${_source_epilogue} -int main(void) { - struct timeval ts; - ts.tv_sec = 0; - ts.tv_usec = 0; - (void)ts; - return 0; -}" HAVE_STRUCT_TIMEVAL) - - -include(CheckCSourceRuns) -set(CMAKE_REQUIRED_FLAGS) +endif(HAVE_WINDOWS_H) +set(EXTRA_DEFINES "${EXTRA_DEFINES}\n${headers_hack}\n#define __unused5") +curl_check_c_source_compiles("struct timeval ts;\nts.tv_sec = 0;\nts.tv_usec = 0" HAVE_STRUCT_TIMEVAL) + + +include(CurlCheckCSourceRuns) +set(EXTRA_DEFINES) +set(HEADER_INCLUDES) if(HAVE_SYS_POLL_H) - set(CMAKE_REQUIRED_FLAGS "-DHAVE_SYS_POLL_H") + set(HEADER_INCLUDES "sys/poll.h") endif(HAVE_SYS_POLL_H) -check_c_source_runs(" - #ifdef HAVE_SYS_POLL_H - # include - #endif - int main(void) { - return poll((void *)0, 0, 10 /*ms*/); - }" HAVE_POLL_FINE) +curl_check_c_source_runs("return poll((void *)0, 0, 10 /*ms*/)" HAVE_POLL_FINE) set(HAVE_SIG_ATOMIC_T 1) -set(CMAKE_REQUIRED_FLAGS) +set(EXTRA_DEFINES) +set(HEADER_INCLUDES) if(HAVE_SIGNAL_H) - set(CMAKE_REQUIRED_FLAGS "-DHAVE_SIGNAL_H") + set(HEADER_INCLUDES "signal.h") set(CMAKE_EXTRA_INCLUDE_FILES "signal.h") endif(HAVE_SIGNAL_H) check_type_size("sig_atomic_t" SIZEOF_SIG_ATOMIC_T) if(HAVE_SIZEOF_SIG_ATOMIC_T) - check_c_source_compiles(" - #ifdef HAVE_SIGNAL_H - # include - #endif - int main(void) { - static volatile sig_atomic_t dummy = 0; - (void)dummy; - return 0; - }" HAVE_SIG_ATOMIC_T_NOT_VOLATILE) + curl_check_c_source_compiles("static volatile sig_atomic_t dummy = 0" HAVE_SIG_ATOMIC_T_NOT_VOLATILE) if(NOT HAVE_SIG_ATOMIC_T_NOT_VOLATILE) set(HAVE_SIG_ATOMIC_T_VOLATILE 1) endif(NOT HAVE_SIG_ATOMIC_T_NOT_VOLATILE) endif(HAVE_SIZEOF_SIG_ATOMIC_T) +set(CHECK_TYPE_SIZE_PREINCLUDE + "#undef inline") + if(HAVE_WINDOWS_H) - set(CMAKE_EXTRA_INCLUDE_FILES winsock2.h) -else() - set(CMAKE_EXTRA_INCLUDE_FILES) + set(CHECK_TYPE_SIZE_PREINCLUDE "${CHECK_TYPE_SIZE_PREINCLUDE} + #ifndef WIN32_LEAN_AND_MEAN + #define WIN32_LEAN_AND_MEAN + #endif + #include ") + if(HAVE_WINSOCK2_H) + set(CHECK_TYPE_SIZE_PREINCLUDE "${CHECK_TYPE_SIZE_PREINCLUDE}\n#include ") + endif(HAVE_WINSOCK2_H) +else(HAVE_WINDOWS_H) if(HAVE_SYS_SOCKET_H) - set(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h) + set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES} + "sys/socket.h") endif(HAVE_SYS_SOCKET_H) -endif() + if(HAVE_NETINET_IN_H) + set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES} + "netinet/in.h") + endif(HAVE_NETINET_IN_H) + if(HAVE_ARPA_INET_H) + set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES} + "arpa/inet.h") + endif(HAVE_ARPA_INET_H) +endif(HAVE_WINDOWS_H) check_type_size("struct sockaddr_storage" SIZEOF_STRUCT_SOCKADDR_STORAGE) if(HAVE_SIZEOF_STRUCT_SOCKADDR_STORAGE) diff --git a/CMake/Platforms/WindowsCache.cmake b/CMake/Platforms/WindowsCache.cmake index 6fc2991..3533a54 100644 --- a/CMake/Platforms/WindowsCache.cmake +++ b/CMake/Platforms/WindowsCache.cmake @@ -5,7 +5,6 @@ if(NOT UNIX) set(HAVE_LIBSOCKET 0) set(NOT_NEED_LIBNSL 0) set(HAVE_LIBNSL 0) - set(HAVE_GETHOSTNAME 1) set(HAVE_LIBZ 0) set(HAVE_LIBCRYPTO 0) @@ -15,6 +14,7 @@ if(NOT UNIX) set(HAVE_ARPA_INET_H 0) set(HAVE_DLFCN_H 0) set(HAVE_FCNTL_H 1) + set(HAVE_FEATURES_H 0) set(HAVE_INTTYPES_H 0) set(HAVE_IO_H 1) set(HAVE_MALLOC_H 1) diff --git a/CMakeLists.txt b/CMakeLists.txt index fc75d59..1c9ae6d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,27 +38,36 @@ # 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.6.2 FATAL_ERROR) set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake;${CMAKE_MODULE_PATH}") include(Utilities) -include(Macros) project( CURL C ) message(WARNING "the curl cmake build system is poorly maintained. Be aware") file (READ ${CURL_SOURCE_DIR}/include/curl/curlver.h CURL_VERSION_H_CONTENTS) -string (REGEX MATCH "#define LIBCURL_VERSION \"[^\"]*" - CURL_VERSION ${CURL_VERSION_H_CONTENTS}) -string (REGEX REPLACE "[^\"]+\"" "" CURL_VERSION ${CURL_VERSION}) -string (REGEX MATCH "#define LIBCURL_VERSION_NUM 0x[0-9a-fA-F]+" - CURL_VERSION_NUM ${CURL_VERSION_H_CONTENTS}) -string (REGEX REPLACE "[^0]+0x" "" CURL_VERSION_NUM ${CURL_VERSION_NUM}) +string (REGEX MATCH "LIBCURL_VERSION_MAJOR[ \t]+([0-9]+)" + LIBCURL_VERSION_MJ ${CURL_VERSION_H_CONTENTS}) +string (REGEX MATCH "([0-9]+)" + LIBCURL_VERSION_MJ ${LIBCURL_VERSION_MJ}) +string (REGEX MATCH + "LIBCURL_VERSION_MINOR[ \t]+([0-9]+)" + LIBCURL_VERSION_MI ${CURL_VERSION_H_CONTENTS}) +string (REGEX MATCH "([0-9]+)" LIBCURL_VERSION_MI ${LIBCURL_VERSION_MI}) +string (REGEX MATCH + "LIBCURL_VERSION_PATCH[ \t]+([0-9]+)" + LIBCURL_VERSION_PT ${CURL_VERSION_H_CONTENTS}) +string (REGEX MATCH "([0-9]+)" LIBCURL_VERSION_PT ${LIBCURL_VERSION_PT}) +set (CURL_MAJOR_VERSION ${LIBCURL_VERSION_MJ}) +set (CURL_MINOR_VERSION ${LIBCURL_VERSION_MI}) +set (CURL_PATCH_VERSION ${LIBCURL_VERSION_PT}) include_regular_expression("^.*$") # Sukender: Is it necessary? # Setup package meta-data # SET(PACKAGE "curl") +set(CURL_VERSION ${CURL_MAJOR_VERSION}.${CURL_MINOR_VERSION}.${CURL_PATCH_VERSION}) message(STATUS "curl version=[${CURL_VERSION}]") # SET(PACKAGE_TARNAME "curl") # SET(PACKAGE_NAME "curl") @@ -74,17 +83,12 @@ include_directories( ${CURL_SOURCE_DIR}/include ) option(BUILD_CURL_EXE "Set to ON to build cURL executable." ON) option(BUILD_CURL_TESTS "Set to ON to build cURL tests." 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) -option(ENABLE_THREADED_RESOLVER "Set to ON to enable POSIX threaded DNS lookup" OFF) +option(CURL_USE_ARES "Set to ON to enable c-ares support" OFF) # 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) +if(CURL_USE_ARES) + set(USE_ARES ${CURL_USE_ARES}) find_package(CARES REQUIRED) list(APPEND CURL_LIBS ${CARES_LIBRARY} ) set(CURL_LIBS ${CURL_LIBS} ${CARES_LIBRARY}) @@ -129,19 +133,6 @@ mark_as_advanced(CURL_DISABLE_HTTP) option(CURL_DISABLE_LDAPS "to disable LDAPS" OFF) mark_as_advanced(CURL_DISABLE_LDAPS) -option(CURL_DISABLE_RTSP "to disable RTSP" OFF) -mark_as_advanced(CURL_DISABLE_RTSP) -option(CURL_DISABLE_PROXY "to disable proxy" OFF) -mark_as_advanced(CURL_DISABLE_PROXY) -option(CURL_DISABLE_POP3 "to disable POP3" OFF) -mark_as_advanced(CURL_DISABLE_POP3) -option(CURL_DISABLE_IMAP "to disable IMAP" OFF) -mark_as_advanced(CURL_DISABLE_IMAP) -option(CURL_DISABLE_SMTP "to disable SMTP" OFF) -mark_as_advanced(CURL_DISABLE_SMTP) -option(CURL_DISABLE_GOPHER "to disable Gopher" OFF) -mark_as_advanced(CURL_DISABLE_GOPHER) - if(HTTP_ONLY) set(CURL_DISABLE_FTP ON) set(CURL_DISABLE_LDAP ON) @@ -150,11 +141,6 @@ if(HTTP_ONLY) set(CURL_DISABLE_DICT ON) set(CURL_DISABLE_FILE ON) set(CURL_DISABLE_TFTP ON) - set(CURL_DISABLE_RTSP ON) - set(CURL_DISABLE_POP3 ON) - set(CURL_DISABLE_IMAP ON) - set(CURL_DISABLE_SMTP ON) - set(CURL_DISABLE_GOPHER ON) endif() option(CURL_DISABLE_COOKIES "to disable cookies support" OFF) @@ -166,52 +152,9 @@ 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) +option(ENABLE_IPV6 "Define if you want to enable IPv6 support" OFF) mark_as_advanced(ENABLE_IPV6) -if(ENABLE_IPV6) - include(CheckStructHasMember) - check_struct_has_member("struct sockaddr_in6" sin6_addr "netinet/in.h" - HAVE_SOCKADDR_IN6_SIN6_ADDR) - check_struct_has_member("struct sockaddr_in6" sin6_scope_id "netinet/in.h" - HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID) - if(NOT HAVE_SOCKADDR_IN6_SIN6_ADDR) - message(WARNING "struct sockaddr_in6 not available, disabling IPv6 support") - # Force the feature off as this name is used as guard macro... - set(ENABLE_IPV6 OFF - CACHE BOOL "Define if you want to enable IPv6 support" FORCE) - endif() -endif() -option(ENABLE_MANUAL "to provide the built-in manual" ON) -unset(USE_MANUAL CACHE) # TODO: cache NROFF/NROFF_MANOPT/USE_MANUAL vars? -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() -endif() # We need ansi c-flags, especially on HP set(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}") @@ -234,24 +177,21 @@ include (CheckIncludeFiles) include (CheckLibraryExists) include (CheckSymbolExists) include (CheckTypeSize) -include (CheckCSourceCompiles) # On windows preload settings if(WIN32) include(${CMAKE_CURRENT_SOURCE_DIR}/CMake/Platforms/WindowsCache.cmake) endif(WIN32) -if(ENABLE_THREADED_RESOLVER) - 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() -endif() +# This macro checks if the symbol exists in the library and if it +# does, it prepends library to the list. +macro(CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE) + check_library_exists("${LIBRARY};${CURL_LIBS}" ${SYMBOL} "${CMAKE_LIBRARY_PATH}" + ${VARIABLE}) + if(${VARIABLE}) + set(CURL_LIBS ${LIBRARY} ${CURL_LIBS}) + endif(${VARIABLE}) +endmacro(CHECK_LIBRARY_EXISTS_CONCAT) # Check for all needed libraries check_library_exists_concat("dl" dlopen HAVE_LIBDL) @@ -269,271 +209,89 @@ if(NOT NOT_NEED_LIBNSL) check_library_exists_concat("nsl" gethostbyname HAVE_LIBNSL) endif(NOT NOT_NEED_LIBNSL) -check_function_exists(gethostname HAVE_GETHOSTNAME) +check_library_exists_concat("ws2_32" getch HAVE_LIBWS2_32) +check_library_exists_concat("winmm" getch HAVE_LIBWINMM) +check_library_exists("wldap32" cldap_open "" HAVE_WLDAP32) if(WIN32) - 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" ON) -mark_as_advanced(CMAKE_USE_OPENSSL) - -set(USE_SSLEAY OFF) -set(USE_OPENSSL OFF) -set(HAVE_LIBCRYPTO OFF) -set(HAVE_LIBSSL OFF) - -if(CMAKE_USE_OPENSSL) - find_package(OpenSSL) - if(OPENSSL_FOUND) - list(APPEND CURL_LIBS ${OPENSSL_LIBRARIES}) - set(USE_SSLEAY ON) - 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_concat("openssl/crypto.h" HAVE_OPENSSL_CRYPTO_H) - check_include_file_concat("openssl/engine.h" HAVE_OPENSSL_ENGINE_H) - check_include_file_concat("openssl/err.h" HAVE_OPENSSL_ERR_H) - check_include_file_concat("openssl/pem.h" HAVE_OPENSSL_PEM_H) - check_include_file_concat("openssl/pkcs12.h" HAVE_OPENSSL_PKCS12_H) - check_include_file_concat("openssl/rsa.h" HAVE_OPENSSL_RSA_H) - check_include_file_concat("openssl/ssl.h" HAVE_OPENSSL_SSL_H) - check_include_file_concat("openssl/x509.h" HAVE_OPENSSL_X509_H) - check_include_file_concat("openssl/rand.h" HAVE_OPENSSL_RAND_H) - endif() -endif() - -if(NOT CURL_DISABLE_LDAP) - - if(WIN32) - option(CURL_LDAP_WIN "Use Windows LDAP implementation" ON) - if(CURL_LDAP_WIN) - check_library_exists("wldap32" cldap_open "" HAVE_WLDAP32) - if(NOT HAVE_WLDAP32) - set(CURL_LDAP_WIN OFF) - endif() - endif() - endif() - - option(CMAKE_USE_OPENLDAP "Use OpenLDAP code." OFF) - mark_as_advanced(CMAKE_USE_OPENLDAP) - set(CMAKE_LDAP_LIB "ldap" CACHE STRING "Name or full path to ldap library") - set(CMAKE_LBER_LIB "lber" CACHE STRING "Name or full path to lber library") - - if(CMAKE_USE_OPENLDAP AND CURL_LDAP_WIN) - message(FATAL_ERROR "Cannot use CURL_LDAP_WIN and CMAKE_USE_OPENLDAP at the same time") - endif() - - # Now that we know, we're not using windows LDAP... - if(NOT CURL_LDAP_WIN) - # Check for LDAP - set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES}) - check_library_exists_concat(${CMAKE_LDAP_LIB} ldap_init HAVE_LIBLDAP) - check_library_exists_concat(${CMAKE_LBER_LIB} ber_init HAVE_LIBLBER) - else() - check_include_file_concat("winldap.h" HAVE_WINLDAP_H) - check_include_file_concat("winber.h" HAVE_WINBER_H) - endif() - - set(CMAKE_LDAP_INCLUDE_DIR "" CACHE STRING "Path to LDAP include directory") - if(CMAKE_LDAP_INCLUDE_DIR) - set(CMAKE_REQUIRED_INCLUDES ${CMAKE_LDAP_INCLUDE_DIR}) - endif() - check_include_file_concat("ldap.h" HAVE_LDAP_H) - check_include_file_concat("lber.h" HAVE_LBER_H) - - if(NOT HAVE_LDAP_H) - message(STATUS "LDAP_H not found CURL_DISABLE_LDAP set ON") - set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE) - elseif(NOT HAVE_LIBLDAP) - message(STATUS "LDAP library '${CMAKE_LDAP_LIB}' not found CURL_DISABLE_LDAP set ON") + set(CURL_DEFAULT_DISABLE_LDAP OFF) + # some windows compilers do not have wldap32 + if(NOT HAVE_WLDAP32) set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE) + message(STATUS "wldap32 not found CURL_DISABLE_LDAP set ON") + option(CURL_LDAP_WIN "Use Windows LDAP implementation" OFF) else() - if(CMAKE_USE_OPENLDAP) - set(USE_OPENLDAP ON) - endif() - if(CMAKE_LDAP_INCLUDE_DIR) - include_directories(${CMAKE_LDAP_INCLUDE_DIR}) - endif() - set(NEED_LBER_H ON) - set(_HEADER_LIST) - if(HAVE_WINDOWS_H) - list(APPEND _HEADER_LIST "windows.h") - endif() - if(HAVE_SYS_TYPES_H) - list(APPEND _HEADER_LIST "sys/types.h") - endif() - list(APPEND _HEADER_LIST "ldap.h") - - set(_SRC_STRING "") - foreach(_HEADER ${_HEADER_LIST}) - set(_INCLUDE_STRING "${_INCLUDE_STRING}#include <${_HEADER}>\n") - endforeach() - - set(_SRC_STRING - " - ${_INCLUDE_STRING} - int main(int argc, char ** argv) - { - BerValue *bvp = NULL; - BerElement *bep = ber_init(bvp); - ber_free(bep, 1); - return 0; - }" - ) - set(CMAKE_REQUIRED_DEFINITIONS "-DLDAP_DEPRECATED=1" "-DWIN32_LEAN_AND_MEAN") - list(APPEND CMAKE_REQUIRED_LIBRARIES ${CMAKE_LDAP_LIB}) - if(HAVE_LIBLBER) - list(APPEND CMAKE_REQUIRED_LIBRARIES ${CMAKE_LBER_LIB}) - endif() - check_c_source_compiles("${_SRC_STRING}" NOT_NEED_LBER_H) - - if(NOT_NEED_LBER_H) - set(NEED_LBER_H OFF) - else() - set(CURL_TEST_DEFINES "${CURL_TEST_DEFINES} -DNEED_LBER_H") - endif() + option(CURL_LDAP_WIN "Use Windows LDAP implementation" ON) endif() - + mark_as_advanced(CURL_LDAP_WIN) endif() -# No ldap, no ldaps. -if(CURL_DISABLE_LDAP) - if(NOT CURL_DISABLE_LDAPS) - message(STATUS "LDAP needs to be enabled to support LDAPS") - set(CURL_DISABLE_LDAPS ON CACHE BOOL "" FORCE) - endif() -endif() -if(NOT CURL_DISABLE_LDAPS) - check_include_file_concat("ldap_ssl.h" HAVE_LDAP_SSL_H) - check_include_file_concat("ldapssl.h" HAVE_LDAPSSL_H) -endif() +# IF(NOT CURL_SPECIAL_LIBZ) +# CHECK_LIBRARY_EXISTS_CONCAT("z" inflateEnd HAVE_LIBZ) +# ENDIF(NOT CURL_SPECIAL_LIBZ) # Check for idn check_library_exists_concat("idn" idna_to_ascii_lz HAVE_LIBIDN) +# Check for LDAP +check_library_exists_concat("ldap" ldap_init HAVE_LIBLDAP) +# if(NOT HAVE_LIBLDAP) +# SET(CURL_DISABLE_LDAP ON) +# endif(NOT HAVE_LIBLDAP) + # Check for symbol dlopen (same as HAVE_LIBDL) check_library_exists("${CURL_LIBS}" dlopen "" HAVE_DLOPEN) +# For other tests to use the same libraries +set(CMAKE_REQUIRED_LIBRARIES ${CURL_LIBS}) + option(CURL_ZLIB "Set to ON to enable building cURL with zlib support." ON) set(HAVE_LIBZ OFF) set(HAVE_ZLIB_H OFF) set(HAVE_ZLIB OFF) -if(CURL_ZLIB) +if(CURL_ZLIB) # AND CURL_CONFIG_HAS_BEEN_RUN_BEFORE find_package(ZLIB QUIET) if(ZLIB_FOUND) set(HAVE_ZLIB_H ON) set(HAVE_ZLIB ON) set(HAVE_LIBZ ON) list(APPEND CURL_LIBS ${ZLIB_LIBRARIES}) - include_directories(${ZLIB_INCLUDE_DIRS}) endif() endif() -#libSSH2 -option(CMAKE_USE_LIBSSH2 "Use libSSH2" ON) -mark_as_advanced(CMAKE_USE_LIBSSH2) -set(USE_LIBSSH2 OFF) -set(HAVE_LIBSSH2 OFF) -set(HAVE_LIBSSH2_H OFF) - -if(CMAKE_USE_LIBSSH2) - find_package(LibSSH2) - if(LIBSSH2_FOUND) - list(APPEND CURL_LIBS ${LIBSSH2_LIBRARY}) - set(CMAKE_REQUIRED_LIBRARIES ${LIBSSH2_LIBRARY}) - set(CMAKE_REQUIRED_INCLUDES "${LIBSSH2_INCLUDE_DIR}") - include_directories("${LIBSSH2_INCLUDE_DIR}") - set(HAVE_LIBSSH2 ON) - set(USE_LIBSSH2 ON) - - # find_package has already found the headers - set(HAVE_LIBSSH2_H ON) - set(CURL_INCLUDES ${CURL_INCLUDES} "${LIBSSH2_INCLUDE_DIR}/libssh2.h") - set(CURL_TEST_DEFINES "${CURL_TEST_DEFINES} -DHAVE_LIBSSH2_H") - - # now check for specific libssh2 symbols as they were added in different versions - set(CMAKE_EXTRA_INCLUDE_FILES "libssh2.h") - check_function_exists(libssh2_version HAVE_LIBSSH2_VERSION) - check_function_exists(libssh2_init HAVE_LIBSSH2_INIT) - check_function_exists(libssh2_exit HAVE_LIBSSH2_EXIT) - check_function_exists(libssh2_scp_send64 HAVE_LIBSSH2_SCP_SEND64) - check_function_exists(libssh2_session_handshake HAVE_LIBSSH2_SESSION_HANDSHAKE) - set(CMAKE_EXTRA_INCLUDE_FILES "") - - endif(LIBSSH2_FOUND) -endif(CMAKE_USE_LIBSSH2) - -option(CMAKE_USE_GSSAPI "Use GSSAPI implementation (right now only Heimdal is supported with CMake build)" OFF) -mark_as_advanced(CMAKE_USE_GSSAPI) - -if(CMAKE_USE_GSSAPI) - find_package(GSS) - - set(HAVE_GSS_API ${GSS_FOUND}) - if(GSS_FOUND) - - message(STATUS "Found ${GSS_FLAVOUR} GSSAPI version: \"${GSS_VERSION}\"") - - set(CMAKE_REQUIRED_INCLUDES ${GSS_INCLUDE_DIR}) - check_include_file_concat("gssapi/gssapi.h" HAVE_GSSAPI_GSSAPI_H) - check_include_file_concat("gssapi/gssapi_generic.h" HAVE_GSSAPI_GSSAPI_GENERIC_H) - check_include_file_concat("gssapi/gssapi_krb5.h" HAVE_GSSAPI_GSSAPI_KRB5_H) - - if(GSS_FLAVOUR STREQUAL "Heimdal") - set(HAVE_GSSHEIMDAL ON) - else() # MIT - set(HAVE_GSSMIT ON) - set(_INCLUDE_LIST "") - if(HAVE_GSSAPI_GSSAPI_H) - list(APPEND _INCLUDE_LIST "gssapi/gssapi.h") - endif() - if(HAVE_GSSAPI_GSSAPI_GENERIC_H) - list(APPEND _INCLUDE_LIST "gssapi/gssapi_generic.h") - endif() - if(HAVE_GSSAPI_GSSAPI_KRB5_H) - list(APPEND _INCLUDE_LIST "gssapi/gssapi_krb5.h") - endif() - - string(REPLACE ";" " " _COMPILER_FLAGS_STR "${GSS_COMPILER_FLAGS}") - string(REPLACE ";" " " _LINKER_FLAGS_STR "${GSS_LINKER_FLAGS}") - - foreach(_dir ${GSS_LINK_DIRECTORIES}) - set(_LINKER_FLAGS_STR "${_LINKER_FLAGS_STR} -L\"${_dir}\"") - endforeach() - - set(CMAKE_REQUIRED_FLAGS "${_COMPILER_FLAGS_STR} ${_LINKER_FLAGS_STR}") - set(CMAKE_REQUIRED_LIBRARIES ${GSS_LIBRARIES}) - check_symbol_exists("GSS_C_NT_HOSTBASED_SERVICE" ${_INCLUDE_LIST} HAVE_GSS_C_NT_HOSTBASED_SERVICE) - if(NOT HAVE_GSS_C_NT_HOSTBASED_SERVICE) - set(HAVE_OLD_GSSMIT ON) - endif() - - endif() - - include_directories(${GSS_INCLUDE_DIR}) - link_directories(${GSS_LINK_DIRECTORIES}) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GSS_COMPILER_FLAGS}") - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${GSS_LINKER_FLAGS}") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GSS_LINKER_FLAGS}") - list(APPEND CURL_LIBS ${GSS_LIBRARIES}) +option(CMAKE_USE_OPENSSL "Use OpenSSL code. Experimental" ON) +mark_as_advanced(CMAKE_USE_OPENSSL) +if(CMAKE_USE_OPENSSL) - else() - message(WARNING "GSSAPI support has been requested but no supporting libraries found. Skipping.") - endif() -endif() + set(USE_SSLEAY OFF) + set(USE_OPENSSL OFF) + set(HAVE_LIBCRYPTO OFF) + set(HAVE_LIBSSL OFF) + + find_package(OpenSSL) + if(OPENSSL_FOUND) + list(APPEND CURL_LIBS ${OPENSSL_LIBRARIES}) + list(APPEND CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) + set(USE_SSLEAY ON) + set(USE_OPENSSL ON) + set(HAVE_LIBCRYPTO ON) + set(HAVE_LIBSSL ON) + endif(OPENSSL_FOUND) +endif(CMAKE_USE_OPENSSL) + +# If we have features.h, then do the _BSD_SOURCE magic +check_include_file("features.h" HAVE_FEATURES_H) + +# Check if header file exists and add it to the list. +macro(CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE) + check_include_files("${CURL_INCLUDES};${FILE}" ${VARIABLE}) + if(${VARIABLE}) + set(CURL_INCLUDES ${CURL_INCLUDES} ${FILE}) + set(CURL_TEST_DEFINES "${CURL_TEST_DEFINES} -D${VARIABLE}") + endif(${VARIABLE}) +endmacro(CHECK_INCLUDE_FILE_CONCAT) -option(ENABLE_UNIX_SOCKETS "Define if you want Unix domain sockets support" ON) -if(ENABLE_UNIX_SOCKETS) - include(CheckStructHasMember) - check_struct_has_member("struct sockaddr_un" sun_path "sys/un.h" USE_UNIX_SOCKETS) -else() - unset(USE_UNIX_SOCKETS CACHE) -endif() # Check for header files if(NOT UNIX) @@ -570,18 +328,32 @@ check_include_file_concat("des.h" HAVE_DES_H) check_include_file_concat("err.h" HAVE_ERR_H) check_include_file_concat("errno.h" HAVE_ERRNO_H) check_include_file_concat("fcntl.h" HAVE_FCNTL_H) +check_include_file_concat("gssapi/gssapi.h" HAVE_GSSAPI_GSSAPI_H) +check_include_file_concat("gssapi/gssapi_generic.h" HAVE_GSSAPI_GSSAPI_GENERIC_H) +check_include_file_concat("gssapi/gssapi_krb5.h" HAVE_GSSAPI_GSSAPI_KRB5_H) check_include_file_concat("idn-free.h" HAVE_IDN_FREE_H) 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("libssh2.h" HAVE_LIBSSH2_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) check_include_file_concat("netinet/in.h" HAVE_NETINET_IN_H) check_include_file_concat("netinet/tcp.h" HAVE_NETINET_TCP_H) - +if(CMAKE_USE_OPENSSL AND OPENSSL_FOUND) + check_include_file_concat("openssl/crypto.h" HAVE_OPENSSL_CRYPTO_H) + check_include_file_concat("openssl/engine.h" HAVE_OPENSSL_ENGINE_H) + check_include_file_concat("openssl/err.h" HAVE_OPENSSL_ERR_H) + check_include_file_concat("openssl/pem.h" HAVE_OPENSSL_PEM_H) + check_include_file_concat("openssl/pkcs12.h" HAVE_OPENSSL_PKCS12_H) + check_include_file_concat("openssl/rsa.h" HAVE_OPENSSL_RSA_H) + check_include_file_concat("openssl/ssl.h" HAVE_OPENSSL_SSL_H) + check_include_file_concat("openssl/x509.h" HAVE_OPENSSL_X509_H) + check_include_file_concat("openssl/rand.h" HAVE_OPENSSL_RAND_H) +endif(CMAKE_USE_OPENSSL AND OPENSSL_FOUND) check_include_file_concat("pem.h" HAVE_PEM_H) check_include_file_concat("poll.h" HAVE_POLL_H) check_include_file_concat("pwd.h" HAVE_PWD_H) @@ -610,13 +382,25 @@ check_include_file_concat("stddef.h" HAVE_STDDEF_H) check_include_file_concat("dlfcn.h" HAVE_DLFCN_H) check_include_file_concat("malloc.h" HAVE_MALLOC_H) check_include_file_concat("memory.h" HAVE_MEMORY_H) +check_include_file_concat("ldap.h" HAVE_LDAP_H) check_include_file_concat("netinet/if_ether.h" HAVE_NETINET_IF_ETHER_H) check_include_file_concat("stdint.h" HAVE_STDINT_H) check_include_file_concat("sockio.h" HAVE_SOCKIO_H) check_include_file_concat("sys/utsname.h" HAVE_SYS_UTSNAME_H) check_include_file_concat("idna.h" HAVE_IDNA_H) +if(NOT HAVE_LDAP_H) + message(STATUS "LDAP_H not found CURL_DISABLE_LDAP set ON") + set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE) +endif() +# No ldap, no ldaps. +if(CURL_DISABLE_LDAP) + if(NOT CURL_DISABLE_LDAPS) + message(STATUS "LDAP needs to be enabled to support LDAPS") + set(CURL_DISABLE_LDAPS ON CACHE BOOL "" FORCE) + endif() +endif() check_type_size(size_t SIZEOF_SIZE_T) check_type_size(ssize_t SIZEOF_SSIZE_T) @@ -689,12 +473,6 @@ find_file(RANDOM_FILE urandom /dev) mark_as_advanced(RANDOM_FILE) # Check for some functions that are used -if(HAVE_LIBWS2_32) - set(CMAKE_REQUIRED_LIBRARIES ws2_32) -elseif(HAVE_LIBSOCKET) - set(CMAKE_REQUIRED_LIBRARIES socket) -endif() - check_symbol_exists(basename "${CURL_INCLUDES}" HAVE_BASENAME) check_symbol_exists(socket "${CURL_INCLUDES}" HAVE_SOCKET) check_symbol_exists(poll "${CURL_INCLUDES}" HAVE_POLL) @@ -758,7 +536,6 @@ check_symbol_exists(strerror_r "${CURL_INCLUDES}" HAVE_STRERROR_R) check_symbol_exists(siginterrupt "${CURL_INCLUDES}" HAVE_SIGINTERRUPT) check_symbol_exists(perror "${CURL_INCLUDES}" HAVE_PERROR) check_symbol_exists(fork "${CURL_INCLUDES}" HAVE_FORK) -check_symbol_exists(getaddrinfo "${CURL_INCLUDES}" HAVE_GETADDRINFO) check_symbol_exists(freeaddrinfo "${CURL_INCLUDES}" HAVE_FREEADDRINFO) check_symbol_exists(freeifaddrs "${CURL_INCLUDES}" HAVE_FREEIFADDRS) check_symbol_exists(pipe "${CURL_INCLUDES}" HAVE_PIPE) @@ -797,6 +574,75 @@ if(NOT HAVE_STRICMP) set(HAVE_LDAP_URL_PARSE 1) endif(NOT HAVE_STRICMP) +# For other curl specific tests, use this macro. +macro(CURL_INTERNAL_TEST CURL_TEST) + if("${CURL_TEST}" MATCHES "^${CURL_TEST}$") + set(MACRO_CHECK_FUNCTION_DEFINITIONS + "-D${CURL_TEST} ${CURL_TEST_DEFINES} ${CMAKE_REQUIRED_FLAGS}") + if(CMAKE_REQUIRED_LIBRARIES) + set(CURL_TEST_ADD_LIBRARIES + "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") + endif(CMAKE_REQUIRED_LIBRARIES) + + message(STATUS "Performing Curl Test ${CURL_TEST}") + try_compile(${CURL_TEST} + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/CMake/CurlTests.c + CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS} + "${CURL_TEST_ADD_LIBRARIES}" + OUTPUT_VARIABLE OUTPUT) + if(${CURL_TEST}) + set(${CURL_TEST} 1 CACHE INTERNAL "Curl test ${FUNCTION}") + message(STATUS "Performing Curl Test ${CURL_TEST} - Success") + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Performing Curl Test ${CURL_TEST} passed with the following output:\n" + "${OUTPUT}\n") + else(${CURL_TEST}) + message(STATUS "Performing Curl Test ${CURL_TEST} - Failed") + set(${CURL_TEST} "" CACHE INTERNAL "Curl test ${FUNCTION}") + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Performing Curl Test ${CURL_TEST} failed with the following output:\n" + "${OUTPUT}\n") + endif(${CURL_TEST}) + endif("${CURL_TEST}" MATCHES "^${CURL_TEST}$") +endmacro(CURL_INTERNAL_TEST) + +macro(CURL_INTERNAL_TEST_RUN CURL_TEST) + if("${CURL_TEST}_COMPILE" MATCHES "^${CURL_TEST}_COMPILE$") + set(MACRO_CHECK_FUNCTION_DEFINITIONS + "-D${CURL_TEST} ${CMAKE_REQUIRED_FLAGS}") + if(CMAKE_REQUIRED_LIBRARIES) + set(CURL_TEST_ADD_LIBRARIES + "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") + endif(CMAKE_REQUIRED_LIBRARIES) + + message(STATUS "Performing Curl Test ${CURL_TEST}") + try_run(${CURL_TEST} ${CURL_TEST}_COMPILE + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/CMake/CurlTests.c + CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS} + "${CURL_TEST_ADD_LIBRARIES}" + OUTPUT_VARIABLE OUTPUT) + if(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST}) + set(${CURL_TEST} 1 CACHE INTERNAL "Curl test ${FUNCTION}") + message(STATUS "Performing Curl Test ${CURL_TEST} - Success") + else(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST}) + message(STATUS "Performing Curl Test ${CURL_TEST} - Failed") + set(${CURL_TEST} "" CACHE INTERNAL "Curl test ${FUNCTION}") + file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log" + "Performing Curl Test ${CURL_TEST} failed with the following output:\n" + "${OUTPUT}") + if(${CURL_TEST}_COMPILE) + file(APPEND + "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log" + "There was a problem running this test\n") + endif(${CURL_TEST}_COMPILE) + file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log" + "\n\n") + endif(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST}) + endif("${CURL_TEST}_COMPILE" MATCHES "^${CURL_TEST}_COMPILE$") +endmacro(CURL_INTERNAL_TEST_RUN) + # Do curl specific tests foreach(CURL_TEST HAVE_FCNTL_O_NONBLOCK @@ -984,6 +830,24 @@ if(MSVC) add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE) endif(MSVC) +# Sets up the dependencies (zlib, OpenSSL, etc.) of a cURL subproject according to options. +# TODO This is far to be complete! +function(SETUP_CURL_DEPENDENCIES TARGET_NAME) + if(CURL_ZLIB AND ZLIB_FOUND) + include_directories(${ZLIB_INCLUDE_DIR}) + #ADD_DEFINITIONS( -DHAVE_ZLIB_H -DHAVE_ZLIB -DHAVE_LIBZ ) + endif() + + if(CMAKE_USE_OPENSSL AND OPENSSL_FOUND) + include_directories(${OPENSSL_INCLUDE_DIR}) + endif() + if(CMAKE_USE_OPENSSL AND CURL_CONFIG_HAS_BEEN_RUN_BEFORE) + #ADD_DEFINITIONS( -DUSE_SSLEAY ) + endif() + + target_link_libraries(${TARGET_NAME} ${CURL_LIBS}) +endfunction() + # Ugly (but functional) way to include "Makefile.inc" by transforming it (= regenerate it). function(TRANSFORM_MAKEFILE_INC INPUT_FILE OUTPUT_FILE) file(READ ${INPUT_FILE} MAKEFILE_INC_TEXT) @@ -1008,133 +872,6 @@ if(BUILD_CURL_TESTS) 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) - # TODO need to disable policy CMP0054 (CMake 3.1) to allow this indirection - if(${ARGN}) - set(_items ${_items} "${label}" PARENT_SCOPE) - endif() -endfunction() - -# Clear list and try to detect available features -set(_items) -_add_if("SSL" SSL_ENABLED) -_add_if("IPv6" ENABLE_IPV6) -_add_if("unix-sockets" USE_UNIX_SOCKETS) -_add_if("libz" HAVE_LIBZ) -_add_if("AsynchDNS" USE_ARES OR USE_THREADS_POSIX) -_add_if("IDN" HAVE_LIBIDN) -# TODO SSP1 (WinSSL) check is missing -_add_if("SSPI" USE_WINDOWS_SSPI) -_add_if("GSS-API" HAVE_GSS_API) -# TODO SSP1 missing for SPNEGO -_add_if("SPNEGO" NOT CURL_DISABLE_CRYPTO_AUTH AND - (HAVE_GSS_API OR USE_WINDOWS_SSPI)) -_add_if("Kerberos" NOT CURL_DISABLE_CRYPTO_AUTH AND - (HAVE_GSS_API 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)) - _add_if("NTLM" 1) - # TODO missing option (autoconf: --enable-ntlm-wb) - _add_if("NTLM_WB" NOT CURL_DISABLE_HTTP AND NTLM_WB_ENABLED) -endif() -# TODO missing option (--enable-tls-srp), depends on GNUTLS_SRP/OPENSSL_SRP -_add_if("TLS-SRP" USE_TLS_SRP) -# TODO option --with-nghttp2 tests for nghttp2 lib and nghttp2/nghttp2.h header -_add_if("HTTP2" USE_NGHTTP2) -string(REPLACE ";" " " SUPPORT_FEATURES "${_items}") -message(STATUS "Enabled features: ${SUPPORT_FEATURES}") - -# Clear list and try to detect available protocols -set(_items) -_add_if("HTTP" NOT CURL_DISABLE_HTTP) -_add_if("HTTPS" NOT CURL_DISABLE_HTTP AND SSL_ENABLED) -_add_if("FTP" NOT CURL_DISABLE_FTP) -_add_if("FTPS" NOT CURL_DISABLE_FTP AND SSL_ENABLED) -_add_if("FILE" NOT CURL_DISABLE_FILE) -_add_if("TELNET" NOT CURL_DISABLE_TELNET) -_add_if("LDAP" NOT CURL_DISABLE_LDAP) -# CURL_DISABLE_LDAP implies CURL_DISABLE_LDAPS -# TODO check HAVE_LDAP_SSL (in autoconf this is enabled with --enable-ldaps) -_add_if("LDAPS" NOT CURL_DISABLE_LDAPS AND - ((USE_OPENLDAP AND SSL_ENABLED) OR - (NOT USE_OPENLDAP AND HAVE_LDAP_SSL))) -_add_if("DICT" NOT CURL_DISABLE_DICT) -_add_if("TFTP" NOT CURL_DISABLE_TFTP) -_add_if("GOPHER" NOT CURL_DISABLE_GOPHER) -_add_if("POP3" NOT CURL_DISABLE_POP3) -_add_if("POP3S" NOT CURL_DISABLE_POP3 AND SSL_ENABLED) -_add_if("IMAP" NOT CURL_DISABLE_IMAP) -_add_if("IMAPS" NOT CURL_DISABLE_IMAP AND SSL_ENABLED) -_add_if("SMTP" NOT CURL_DISABLE_SMTP) -_add_if("SMTPS" NOT CURL_DISABLE_SMTP AND SSL_ENABLED) -_add_if("SCP" USE_LIBSSH2) -_add_if("SFTP" USE_LIBSSH2) -_add_if("RTSP" NOT CURL_DISABLE_RTSP) -_add_if("RTMP" USE_LIBRTMP) -list(SORT _items) -string(REPLACE ";" " " SUPPORT_PROTOCOLS "${_items}") -message(STATUS "Enabled protocols: ${SUPPORT_PROTOCOLS}") - -# curl-config needs the following options to be set. -set(CC "${CMAKE_C_COMPILER}") -# TODO probably put a -D... options here? -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) - # Broken: LIBCURL_LIBS below; .a lib is not built - message(WARNING "Static linking is broken!") - set(ENABLE_STATIC "no") -else() - set(ENABLE_STATIC "no") -endif() -set(exec_prefix "\${prefix}") -set(includedir "\${prefix}/include") -set(LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS}") -set(LIBCURL_LIBS "") -set(libdir "${CMAKE_INSTALL_PREFIX}/lib") -# TODO CURL_LIBS also contains absolute paths which don't work with static -l... -foreach(_lib ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} ${CURL_LIBS}) - set(LIBCURL_LIBS "${LIBCURL_LIBS} -l${_lib}") -endforeach() -# "a" (Linux) or "lib" (Windows) -string(REPLACE "." "" libext "${CMAKE_STATIC_LIBRARY_SUFFIX}") -set(prefix "${CMAKE_INSTALL_PREFIX}") -# Set this to "yes" to append all libraries on which -lcurl is dependent -set(REQUIRE_LIB_DEPS "no") -# SUPPORT_FEATURES -# SUPPORT_PROTOCOLS -set(VERSIONNUM "${CURL_VERSION_NUM}") - -# Finally generate a "curl-config" matching this config -configure_file("${CURL_SOURCE_DIR}/curl-config.in" - "${CURL_BINARY_DIR}/curl-config" @ONLY) -install(FILES "${CMAKE_BINARY_DIR}/curl-config" - DESTINATION bin - PERMISSIONS - OWNER_READ OWNER_WRITE OWNER_EXECUTE - GROUP_READ GROUP_EXECUTE - WORLD_READ WORLD_EXECUTE) - -# Finally generate a pkg-config file matching this config -configure_file("${CURL_SOURCE_DIR}/libcurl.pc.in" - "${CURL_BINARY_DIR}/libcurl.pc" @ONLY) -install(FILES "${CMAKE_BINARY_DIR}/libcurl.pc" - DESTINATION lib/pkgconfig) - # This needs to be run very last so other parts of the scripts can take advantage of this. 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") diff --git a/COPYING b/COPYING index 6b5d59f..dd990b6 100644 --- a/COPYING +++ b/COPYING @@ -1,6 +1,6 @@ COPYRIGHT AND PERMISSION NOTICE -Copyright (c) 1996 - 2015, Daniel Stenberg, . +Copyright (c) 1996 - 2014, Daniel Stenberg, . All rights reserved. diff --git a/Makefile.am b/Makefile.am index 3b91e83..18cb7d9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -24,10 +24,11 @@ AUTOMAKE_OPTIONS = foreign 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_DIST = CMakeLists.txt CMake/CMakeConfigurableFile.in \ +CMake/CurlCheckCSourceCompiles.cmake CMake/CurlCheckCSourceRuns.cmake \ +CMake/CurlTests.c CMake/FindOpenSSL.cmake CMake/FindZLIB.cmake \ +CMake/OtherTests.cmake CMake/Platforms/WindowsCache.cmake \ +CMake/Utilities.cmake include/curl/curlbuild.h.cmake VC6_LIBTMPL = projects/Windows/VC6/lib/libcurl.tmpl VC6_LIBDSP = projects/Windows/VC6/lib/libcurl.dsp @@ -87,7 +88,6 @@ VC12_SRCVCXPROJ_DEPS = $(VC12_SRCTMPL) Makefile.am src/Makefile.inc VC_DIST = projects/README \ projects/build-openssl.bat \ - projects/checksrc.bat \ projects/Windows/VC6/curl.dsw \ projects/Windows/VC6/lib/libcurl.dsw $(VC6_LIBDSP) \ projects/Windows/VC6/src/curlsrc.dsw $(VC6_SRCDSP) \ diff --git a/Makefile.dist b/Makefile.dist index f0f50d8..343b40c 100644 --- a/Makefile.dist +++ b/Makefile.dist @@ -130,42 +130,6 @@ vc-x64: $(VC) cd ..\src nmake /f Makefile.$(VC) MACHINE=x64 cfg=release -vc-sspi: $(VC) - cd lib - nmake /f Makefile.$(VC) cfg=release WINDOWS_SSPI=1 - cd ..\src - nmake /f Makefile.$(VC) cfg=release WINDOWS_SSPI=1 - -vc-x64-sspi: $(VC) - cd lib - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release WINDOWS_SSPI=1 - cd ..\src - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release WINDOWS_SSPI=1 - -vc-idn: $(VC) - cd lib - nmake /f Makefile.$(VC) cfg=release USE_IDN=1 - cd ..\src - nmake /f Makefile.$(VC) cfg=release USE_IDN=1 - -vc-x64-idn: $(VC) - cd lib - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release USE_IDN=1 - cd ..\src - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release USE_IDN=1 - -vc-idn-sspi: $(VC) - cd lib - nmake /f Makefile.$(VC) cfg=release USE_IDN=1 WINDOWS_SSPI=1 - cd ..\src - nmake /f Makefile.$(VC) cfg=release USE_IDN=1 WINDOWS_SSPI=1 - -vc-x64-idn-sspi: $(VC) - cd lib - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release USE_IDN=1 WINDOWS_SSPI=1 - cd ..\src - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release USE_IDN=1 WINDOWS_SSPI=1 - vc-zlib: $(VC) cd lib nmake /f Makefile.$(VC) cfg=release-zlib @@ -178,233 +142,53 @@ vc-x64-zlib: $(VC) cd ..\src nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-zlib -vc-zlib-sspi: $(VC) - cd lib - nmake /f Makefile.$(VC) cfg=release-zlib WINDOWS_SSPI=1 - cd ..\src - nmake /f Makefile.$(VC) cfg=release-zlib WINDOWS_SSPI=1 - -vc-x64-zlib-sspi: $(VC) - cd lib - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-zlib WINDOWS_SSPI=1 - cd ..\src - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-zlib WINDOWS_SSPI=1 - -vc-zlib-idn: $(VC) - cd lib - nmake /f Makefile.$(VC) cfg=release-zlib USE_IDN=1 - cd ..\src - nmake /f Makefile.$(VC) cfg=release-zlib USE_IDN=1 - -vc-x64-zlib-idn: $(VC) - cd lib - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-zlib USE_IDN=1 - cd ..\src - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-zlib USE_IDN=1 - -vc-zlib-idn-sspi: $(VC) - cd lib - nmake /f Makefile.$(VC) cfg=release-zlib USE_IDN=1 WINDOWS_SSPI=1 - cd ..\src - nmake /f Makefile.$(VC) cfg=release-zlib USE_IDN=1 WINDOWS_SSPI=1 - -vc-x64-zlib-idn-sspi: $(VC) - cd lib - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-zlib USE_IDN=1 WINDOWS_SSPI=1 - cd ..\src - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-zlib USE_IDN=1 WINDOWS_SSPI=1 - vc-ssl: $(VC) cd lib nmake /f Makefile.$(VC) cfg=release-ssl cd ..\src nmake /f Makefile.$(VC) cfg=release-ssl -vc-x64-ssl: $(VC) - cd lib - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl - cd ..\src - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl - -vc-ssl-sspi: $(VC) - cd lib - nmake /f Makefile.$(VC) cfg=release-ssl WINDOWS_SSPI=1 - cd ..\src - nmake /f Makefile.$(VC) cfg=release-ssl WINDOWS_SSPI=1 - -vc-x64-ssl-sspi: $(VC) - cd lib - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl WINDOWS_SSPI=1 - cd ..\src - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl WINDOWS_SSPI=1 - -vc-ssl-idn: $(VC) - cd lib - nmake /f Makefile.$(VC) cfg=release-ssl USE_IDN=1 - cd ..\src - nmake /f Makefile.$(VC) cfg=release-ssl USE_IDN=1 - -vc-x64-ssl-idn: $(VC) - cd lib - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl USE_IDN=1 - cd ..\src - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl USE_IDN=1 - -vc-ssl-idn-sspi: $(VC) - cd lib - nmake /f Makefile.$(VC) cfg=release-ssl USE_IDN=1 WINDOWS_SSPI=1 - cd ..\src - nmake /f Makefile.$(VC) cfg=release-ssl USE_IDN=1 WINDOWS_SSPI=1 - -vc-x64-ssl-idn-sspi: $(VC) - cd lib - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl USE_IDN=1 WINDOWS_SSPI=1 - cd ..\src - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl USE_IDN=1 WINDOWS_SSPI=1 - -vc-ssl-zlib: $(VC) - cd lib - nmake /f Makefile.$(VC) cfg=release-ssl-zlib - cd ..\src - nmake /f Makefile.$(VC) cfg=release-ssl-zlib - -vc-x64-ssl-zlib: $(VC) - cd lib - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib - cd ..\src - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib - -vc-ssl-zlib-sspi: $(VC) - cd lib - nmake /f Makefile.$(VC) cfg=release-ssl-zlib WINDOWS_SSPI=1 - cd ..\src - nmake /f Makefile.$(VC) cfg=release-ssl-zlib WINDOWS_SSPI=1 - -vc-x64-ssl-zlib-sspi: $(VC) - cd lib - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib WINDOWS_SSPI=1 - cd ..\src - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib WINDOWS_SSPI=1 - -vc-ssl-zlib-idn: $(VC) - cd lib - nmake /f Makefile.$(VC) cfg=release-ssl-zlib USE_IDN=1 - cd ..\src - nmake /f Makefile.$(VC) cfg=release-ssl-zlib USE_IDN=1 - -vc-x64-ssl-zlib-idn: $(VC) - cd lib - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib USE_IDN=1 - cd ..\src - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib USE_IDN=1 - -vc-ssl-zlib-idn-sspi: $(VC) - cd lib - nmake /f Makefile.$(VC) cfg=release-ssl-zlib USE_IDN=1 WINDOWS_SSPI=1 - cd ..\src - nmake /f Makefile.$(VC) cfg=release-ssl-zlib USE_IDN=1 WINDOWS_SSPI=1 - -vc-x64-ssl-zlib-idn-sspi: $(VC) - cd lib - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib USE_IDN=1 WINDOWS_SSPI=1 - cd ..\src - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib USE_IDN=1 WINDOWS_SSPI=1 - -vc-ssl-ssh2-zlib: $(VC) - cd lib - nmake /f Makefile.$(VC) cfg=release-ssl-ssh2-zlib - cd ..\src - nmake /f Makefile.$(VC) cfg=release-ssl-ssh2-zlib - -vc-x64-ssl-ssh2-zlib: $(VC) - cd lib - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-ssh2-zlib - cd ..\src - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-ssh2-zlib - -vc-ssl-ssh2-zlib-sspi: $(VC) - cd lib - nmake /f Makefile.$(VC) cfg=release-ssl-ssh2-zlib WINDOWS_SSPI=1 - cd ..\src - nmake /f Makefile.$(VC) cfg=release-ssl-ssh2-zlib WINDOWS_SSPI=1 - -vc-x64-ssl-ssh2-zlib-sspi: $(VC) - cd lib - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-ssh2-zlib WINDOWS_SSPI=1 - cd ..\src - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-ssh2-zlib WINDOWS_SSPI=1 - -vc-ssl-ssh2-zlib-idn: $(VC) - cd lib - nmake /f Makefile.$(VC) cfg=release-ssl-ssh2-zlib USE_IDN=1 - cd ..\src - nmake /f Makefile.$(VC) cfg=release-ssl-ssh2-zlib USE_IDN=1 - -vc-x64-ssl-ssh2-zlib-idn: $(VC) - cd lib - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-ssh2-zlib USE_IDN=1 - cd ..\src - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-ssh2-zlib USE_IDN=1 - -vc-ssl-ssh2-zlib-idn-sspi: $(VC) - cd lib - nmake /f Makefile.$(VC) cfg=release-ssl-ssh2-zlib USE_IDN=1 WINDOWS_SSPI=1 - cd ..\src - nmake /f Makefile.$(VC) cfg=release-ssl-ssh2-zlib USE_IDN=1 WINDOWS_SSPI=1 - -vc-x64-ssl-ssh2-zlib-idn-sspi: $(VC) - cd lib - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-ssh2-zlib USE_IDN=1 WINDOWS_SSPI=1 - cd ..\src - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-ssh2-zlib USE_IDN=1 WINDOWS_SSPI=1 - vc-winssl: $(VC) cd lib nmake /f Makefile.$(VC) cfg=release-winssl WINDOWS_SSPI=1 cd ..\src nmake /f Makefile.$(VC) cfg=release-winssl WINDOWS_SSPI=1 -vc-x64-winssl: $(VC) +vc-x64-ssl: $(VC) cd lib - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl WINDOWS_SSPI=1 + nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl cd ..\src - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl WINDOWS_SSPI=1 + nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl -vc-winssl-idn: $(VC) +vc-x64-winssl: $(VC) cd lib - nmake /f Makefile.$(VC) cfg=release-winssl USE_IDN=1 WINDOWS_SSPI=1 + nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl WINDOWS_SSPI=1 cd ..\src - nmake /f Makefile.$(VC) cfg=release-winssl USE_IDN=1 WINDOWS_SSPI=1 + nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl WINDOWS_SSPI=1 -vc-x64-winssl-idn: $(VC) +vc-ssl-zlib: $(VC) cd lib - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl USE_IDN=1 WINDOWS_SSPI=1 + nmake /f Makefile.$(VC) cfg=release-ssl-zlib cd ..\src - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl USE_IDN=1 WINDOWS_SSPI=1 + nmake /f Makefile.$(VC) cfg=release-ssl-zlib vc-winssl-zlib: $(VC) cd lib - nmake /f Makefile.$(VC) cfg=release-winssl-zlib WINDOWS_SSPI=1 + nmake /f Makefile.$(VC) cfg=release-winssl-zlib cd ..\src - nmake /f Makefile.$(VC) cfg=release-winssl-zlib WINDOWS_SSPI=1 + nmake /f Makefile.$(VC) cfg=release-winssl-zlib -vc-x64-winssl-zlib: $(VC) - cd lib - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl-zlib WINDOWS_SSPI=1 - cd ..\src - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl-zlib WINDOWS_SSPI=1 - -vc-winssl-zlib-idn: $(VC) +vc-x64-ssl-zlib: $(VC) cd lib - nmake /f Makefile.$(VC) cfg=release-winssl-zlib USE_IDN=1 WINDOWS_SSPI=1 + nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib cd ..\src - nmake /f Makefile.$(VC) cfg=release-winssl-zlib USE_IDN=1 WINDOWS_SSPI=1 + nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib -vc-x64-winssl-zlib-idn: $(VC) +vc-x64-winssl-zlib: $(VC) cd lib - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl-zlib USE_IDN=1 WINDOWS_SSPI=1 + nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl-zlib cd ..\src - nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl-zlib USE_IDN=1 WINDOWS_SSPI=1 + nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl-zlib vc-ssl-dll: $(VC) cd lib @@ -448,6 +232,12 @@ vc-zlib-dll: $(VC) cd ..\src nmake /f Makefile.$(VC) cfg=release-zlib-dll +vc-sspi: $(VC) + cd lib + nmake /f Makefile.$(VC) cfg=release WINDOWS_SSPI=1 + cd ..\src + nmake /f Makefile.$(VC) cfg=release WINDOWS_SSPI=1 + djgpp: $(MAKE) -C lib -f Makefile.dj $(MAKE) -C src -f Makefile.dj diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 259211d..0f003cc 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -1,33 +1,67 @@ -Curl and libcurl 7.40.1 +Curl and libcurl 7.37.1 - Public curl releases: 144 + Public curl releases: 140 Command line options: 162 curl_easy_setopt() options: 208 Public functions in libcurl: 58 - Contributors: 1233 + Contributors: 1155 This release includes the following changes: - o NetWare build: added TLS-SRP enabled build - o winbuild: Added option to build with c-ares - o + o bits.close: introduce connection close tracking + o darwinssl: Add support for --cacert + o polarssl: add ALPN support + o docs: Added new option man pages This release includes the following bugfixes: - o sasl_gssapi: Fixed build on NetBSD with built-in GSS-API [1] - o FTP: fix IPv6 host using link-local address [2] - o FTP: if EPSV fails on IPV6 connections, bail out - o gssapi: Remove need for duplicated GSS_C_NT_HOSTBASED_SERVICE definitions - o NSS: fix compiler error when built http2-enabled - o mingw build: allow to pass custom CFLAGS [3] - o add -m64 CFLAGS when targeting mingw64, add -m32/-m64 to LDFLAGS [4] - o curl_schannel.c: mark session as removed from cache if not freed [5] - o Curl_pretransfer: reset expected transfer sizes [6] - o curl.h: remove extra space [7] - o curl_endian: Fixed build when 64-bit integers are not supported [8] - o checksrc.bat: Better detection of Perl installation - o build-openssl.bat: Added check for Perl installation - o + o build: Fixed incorrect reference to curl_setup.h in Visual Studio files + o build: Use $(TargetDir) and $(TargetName) macros for .pdb and .lib output + o curl.1: clarify that -u can't specify a user with colon [1] + o openssl: Fix uninitialized variable use in NPN callback + o curl_easy_reset: reset the URL [2] + o curl_version_info.3: returns a pointer to a static struct + o url-parser: only use if_nametoindex if detected by configure [3] + o select: with winsock, avoid passing unsupported arguments to select() [4] + o gnutls: don't use deprecated type names anymore + o gnutls: allow building with nghttp2 but without ALPN support + o tests: Fix portability issue with the tftpd server + o curl_sasl_sspi: Fixed corrupt hostname in DIGEST-MD5 SPN + o curl_sasl: extended native DIGEST-MD5 cnonce to be a 32-byte hex string + o random: use Curl_rand() for proper random data [5] + o Curl_ossl_init: call OPENSSL_config for initing engines [6] + o config-win32.h: Updated for VC12 [7] + o winbuild: Don't USE_WINSSL when WITH_SSL is being used + o getinfo: HTTP CONNECT code not reset between transfers [8] + o Curl_rand: Use a fake entropy for debug builds when CURL_ENTROPY set + o http2: avoid segfault when using the plain-text http2 + o conncache: move the connection counter to the cache struct + o http2: better return code error checking + o curlbuild: fix GCC build on SPARC systems without configure script + o tool_metalink: Support polarssl as digest provider + o curl.h: reverse the enum/define setup for old symbols + o curl.h: moved two really old deprecated symbols + o curl.h: renamed CURLOPT_DEPRECATEDx to CURLOPT_OBSOLETEx + o buildconf: do not search tools in current directory. + o OS400: make it compilable again. Make RPG binding up to date + o nss: do not abort on connection failure (failing tests 305 and 404) + o nss: make the fallback to SSLv3 work again + o tool: prevent valgrind from reporting possibly lost memory (nss only) + o progress callback: skip last callback update on errors [9] + o nss: fix a memory leak when CURLOPT_CRLFILE is used + o compiler warnings: potentially uninitialized variables [10] + o url.c: Fixed memory leak on OOM + o gnutls: ignore invalid certificate dates with VERIFYPEER disabled + o gnutls: fix SRP support with versions of GnuTLS from 2.99.0 + o gnutls: fixed a couple of uninitialized variable references + o gnutls: fixed compilation against versions < 2.12.0 + o build: Fixed overridden compiler PDB settings in VC7 to VC12 + o ntlm_wb: Fixed buffer size not being large enough for NTLMv2 sessions [11] + o netrc: don't abort if home dir cannot be found + o netrc: fixed thread safety problem by using getpwuid_r if available + o cookie: avoid mutex deadlock [12] + o configure: respect host tool prefix for krb5-config + o gnutls: handle IP address in cert name check This release includes the following known bugs: @@ -36,20 +70,26 @@ 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: - Daniel Stenberg, Guenter Knauf, Jean-Francois Durand, John E. Malmberg, - Marc Hoersken, Mohammad AlSaleh, Sam Schanken, Steve Holme, Thomas Klausner, - Viktor Szakats, Vojtěch Král, Yun SangHo + Alessandro Ghedini, Brad Spencer, Chris Young, Colin Hogben, Dan Fandrich, + Daniel Stenberg, David Woodhouse, Dimitrios Siganos, Fabian Frank, + Glen A Johnson Jr., Hubert Kario, Jeff Pohlmeyer, Jonathan Cardoso Machado, + Kamil Dudka, Lindley French, Marcel Raad, Michał Górny, Nick Zitzmann, + Patrick Monnerat, Ray Satiro, Steve Holme, Tatsuhiro Tsujikawa, + Vilmos Nebehaj, Yousuke Kimoto, Dmitry Falko Thanks! (and sorry if I forgot to mention someone) References to bug reports and discussions on issues: - [1] = http://curl.haxx.se/bug/view.cgi?id=1469 - [2] = http://curl.haxx.se/bug/view.cgi?id=1468 - [3] = https://github.com/bagder/curl/pull/136 - [4] = https://github.com/bagder/curl/pull/134 - [5] = http://curl.haxx.se/mail/lib-2015-01/0036.html - [6] = http://curl.haxx.se/mail/lib-2015-01/0065.html - [7] = https://github.com/bagder/curl/pull/137 - [8] = http://curl.haxx.se/mail/lib-2015-01/0094.html - [9] = + [1] = http://curl.haxx.se/bug/view.cgi?id=1375 + [2] = http://curl.haxx.se/mail/lib-2014-05/0235.html + [3] = http://curl.haxx.se/mail/lib-2014-05/0260.html + [4] = http://curl.haxx.se/mail/lib-2014-05/0278.html + [5] = http://curl.haxx.se/mail/lib-2014-06/0001.html + [6] = http://curl.haxx.se/mail/lib-2014-06/0003.html + [7] = http://curl.haxx.se/bug/view.cgi?id=1378 + [8] = http://curl.haxx.se/bug/view.cgi?id=1380 + [9] = http://curl.haxx.se/mail/lib-2014-06/0062.html + [10] = http://curl.haxx.se/bug/view.cgi?id=1391 + [11] = http://curl.haxx.se/mail/lib-2014-07/0103.html + [12] = http://curl.haxx.se/mail/lib-2014-02/0184.html diff --git a/TODO-RELEASE b/TODO-RELEASE new file mode 100644 index 0000000..6d0f757 --- /dev/null +++ b/TODO-RELEASE @@ -0,0 +1,4 @@ +To be addressed in ... +======================= + +327 - diff --git a/acinclude.m4 b/acinclude.m4 index 453358d..9fbcf64 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -2614,8 +2614,8 @@ AC_HELP_STRING([--without-ca-path], [Don't use a default CA path]), capath="no" elif test "x$want_capath" != "xno" -a "x$want_capath" != "xunset"; then dnl --with-ca-path given - if test "x$OPENSSL_ENABLED" != "x1" -a "x$POLARSSL_ENABLED" != "x1"; then - AC_MSG_ERROR([--with-ca-path only works with openSSL or PolarSSL]) + if test "x$OPENSSL_ENABLED" != "x1"; then + AC_MSG_ERROR([--with-ca-path only works with openSSL]) fi capath="$want_capath" ca="no" diff --git a/buildconf b/buildconf index f3f0bd5..2520565 100755 --- a/buildconf +++ b/buildconf @@ -6,7 +6,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +# 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 @@ -190,32 +190,32 @@ else fi #-------------------------------------------------------------------------- -# GNU libtoolize preliminary check +# GNU libtool preliminary check # want_lt_major=1 want_lt_minor=4 want_lt_patch=2 want_lt_version=1.4.2 -# This approach that tries 'glibtoolize' first is intended for systems that -# have GNU libtool named as 'glibtoolize' and libtoolize not being GNU's. +# This approach that tries 'glibtool' first is intended for systems that +# have GNU libtool named as 'glibtool' and libtool not being GNU's. -libtoolize=`findtool glibtoolize 2>/dev/null` -if test ! -x "$libtoolize"; then - libtoolize=`findtool ${LIBTOOLIZE:-libtoolize}` +libtool=`findtool glibtool 2>/dev/null` +if test ! -x "$libtool"; then + libtool=`findtool ${LIBTOOL:-libtool}` fi -if test -z "$libtoolize"; then - echo "buildconf: libtoolize not found." - echo " You need GNU libtoolize $want_lt_version or newer installed." +if test -z "$libtool"; then + echo "buildconf: libtool not found." + echo " You need GNU libtool $want_lt_version or newer installed." exit 1 fi -lt_pver=`$libtoolize --version 2>/dev/null|head -n 1` +lt_pver=`$libtool --version 2>/dev/null|head -n 1` lt_qver=`echo $lt_pver|sed -e "s/([^)]*)//g" -e "s/^[^0-9]*//g"` lt_version=`echo $lt_qver|sed -e "s/[- ].*//" -e "s/\([a-z]*\)$//"` if test -z "$lt_version"; then - echo "buildconf: libtoolize not found." - echo " You need GNU libtoolize $want_lt_version or newer installed." + echo "buildconf: libtool not found." + echo " You need GNU libtool $want_lt_version or newer installed." exit 1 fi old_IFS=$IFS; IFS='.'; set $lt_version; IFS=$old_IFS @@ -245,12 +245,27 @@ else lt_status="good" fi if test "$lt_status" != "good"; then - echo "buildconf: libtoolize version $lt_version found." - echo " You need GNU libtoolize $want_lt_version or newer installed." + echo "buildconf: libtool version $lt_version found." + echo " You need GNU libtool $want_lt_version or newer installed." exit 1 fi -echo "buildconf: libtoolize version $lt_version (ok)" +echo "buildconf: libtool version $lt_version (ok)" + +#-------------------------------------------------------------------------- +# GNU libtoolize check +# +if test -z "$LIBTOOLIZE"; then + # use (g)libtoolize from same location as (g)libtool + libtoolize="${libtool}ize" +else + libtoolize=`findtool $LIBTOOLIZE` +fi +if test ! -f "$libtoolize"; then + echo "buildconf: libtoolize not found." + echo " You need GNU libtoolize $want_lt_version or newer installed." + exit 1 +fi #-------------------------------------------------------------------------- # m4 check diff --git a/configure.ac b/configure.ac index a1b560c..dd014b7 100644 --- a/configure.ac +++ b/configure.ac @@ -151,10 +151,10 @@ dnl initialize all the info variables curl_ssh_msg="no (--with-libssh2)" curl_zlib_msg="no (--with-zlib)" curl_gss_msg="no (--with-gssapi)" + curl_spnego_msg="no (--with-spnego)" curl_tls_srp_msg="no (--enable-tls-srp)" curl_res_msg="default (--enable-ares / --enable-threaded-resolver)" curl_ipv6_msg="no (--enable-ipv6)" -curl_unix_sockets_msg="no (--enable-unix-sockets)" curl_idn_msg="no (--with-{libidn,winidn})" curl_manual_msg="no (--enable-manual)" curl_libcurl_msg="enabled (--disable-libcurl-option)" @@ -575,22 +575,6 @@ AC_HELP_STRING([--disable-imap],[Disable IMAP support]), ) -AC_MSG_CHECKING([whether to support smb]) -AC_ARG_ENABLE(smb, -AC_HELP_STRING([--enable-smb],[Enable SMB/CIFS support]) -AC_HELP_STRING([--disable-smb],[Disable SMB/CIFS support]), -[ case "$enableval" in - no) - AC_MSG_RESULT(no) - AC_DEFINE(CURL_DISABLE_SMB, 1, [to disable SMB/CIFS]) - AC_SUBST(CURL_DISABLE_SMB, [1]) - ;; - *) AC_MSG_RESULT(yes) - ;; - esac ], - AC_MSG_RESULT(yes) -) - AC_MSG_CHECKING([whether to support smtp]) AC_ARG_ENABLE(smtp, AC_HELP_STRING([--enable-smtp],[Enable SMTP support]) @@ -1064,10 +1048,10 @@ dnl ********************************************************************** dnl Checks for IPv6 dnl ********************************************************************** -AC_MSG_CHECKING([whether to enable IPv6]) +AC_MSG_CHECKING([whether to enable ipv6]) AC_ARG_ENABLE(ipv6, -AC_HELP_STRING([--enable-ipv6],[Enable IPv6 (with IPv4) support]) -AC_HELP_STRING([--disable-ipv6],[Disable IPv6 support]), +AC_HELP_STRING([--enable-ipv6],[Enable ipv6 (with ipv4) support]) +AC_HELP_STRING([--disable-ipv6],[Disable ipv6 support]), [ case "$enableval" in no) AC_MSG_RESULT(no) @@ -1151,6 +1135,41 @@ no) esac dnl ********************************************************************** +dnl Check for FBopenssl(SPNEGO) libraries +dnl ********************************************************************** + +AC_ARG_WITH(spnego, + AC_HELP_STRING([--with-spnego=DIR], + [Specify location of SPNEGO library fbopenssl]), [ + SPNEGO_ROOT="$withval" + if test x"$SPNEGO_ROOT" != xno; then + want_spnego="yes" + fi +]) + +AC_MSG_CHECKING([if SPNEGO support is requested]) +if test x"$want_spnego" = xyes; then + + if test X"$SPNEGO_ROOT" = Xyes; then + AC_MSG_ERROR([FBOpenSSL libs and/or directories were not found where specified!]) + AC_MSG_RESULT(no) + else + if test -z "$SPNEGO_LIB_DIR"; then + LDFLAGS="$LDFLAGS -L$SPNEGO_ROOT -lfbopenssl" + else + LDFLAGS="$LDFLAGS $SPNEGO_LIB_DIR" + fi + + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_SPNEGO, 1, + [Define this if you have the SPNEGO library fbopenssl]) + curl_spnego_msg="enabled" + fi +else + AC_MSG_RESULT(no) +fi + +dnl ********************************************************************** dnl Check for GSS-API libraries dnl ********************************************************************** @@ -1265,7 +1284,7 @@ else fi if test x"$want_gss" = xyes; then AC_DEFINE(HAVE_GSSAPI, 1, [if you have GSS-API libraries]) - HAVE_GSSAPI=1 + curl_gss_msg="enabled (MIT Kerberos/Heimdal)" if test -n "$gnu_gss"; then @@ -1277,6 +1296,12 @@ if test x"$want_gss" = xyes; then *-*-darwin*) LIBS="-lgssapi_krb5 -lresolv $LIBS" ;; + *-hp-hpux*) + if test "$GSSAPI_ROOT" != "yes"; then + LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff" + fi + LIBS="-lgss $LIBS" + ;; *) if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then dnl krb5-config doesn't have --libs-only-L or similar, put everything @@ -1288,22 +1313,11 @@ if test x"$want_gss" = xyes; then dnl into LIBS gss_libs=`$GSSAPI_ROOT/bin/krb5-config --libs gssapi` LIBS="$gss_libs $LIBS" + elif test "$GSSAPI_ROOT" != "yes"; then + LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff" + LIBS="-lgssapi $LIBS" else - case $host in - *-hp-hpux*) - gss_libname="gss" - ;; - *) - gss_libname="gssapi" - ;; - esac - - if test "$GSSAPI_ROOT" != "yes"; then - LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff" - LIBS="-l$gss_libname $LIBS" - else - LIBS="-l$gss_libname $LIBS" - fi + LIBS="-lgssapi $LIBS" fi ;; esac @@ -1587,7 +1601,10 @@ if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then ENGINE_cleanup \ CRYPTO_cleanup_all_ex_data \ SSL_get_shutdown \ - SSLv2_client_method ) + SSLv2_client_method \ + SSL_CTX_set_next_proto_select_cb \ + SSL_CTX_set_alpn_protos \ + SSL_CTX_set_alpn_select_cb ) dnl Make an attempt to detect if this is actually yassl's headers and dnl OpenSSL emulation layer. We still leave everything else believing @@ -2097,10 +2114,6 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then if test "x$USE_NSS" = "xyes"; then AC_MSG_NOTICE([detected NSS version $version]) - dnl needed when linking the curl tool without USE_EXPLICIT_LIB_DEPS - NSS_LIBS=$addlib - AC_SUBST([NSS_LIBS]) - dnl when shared libs were found in a path that the run-time dnl linker doesn't search through, we need to add it to dnl LD_LIBRARY_PATH to prevent further configure tests to fail @@ -2349,6 +2362,12 @@ if test X"$OPT_LIBSSH2" != Xno; then 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 + dnl libssh2_version is a post 1.0 addition + dnl libssh2_init and libssh2_exit were added in 1.2.5 + dnl libssh2_scp_send64 was added in 1.2.6 + dnl libssh2_session_handshake was added in 1.2.8 + AC_CHECK_FUNCS( libssh2_version libssh2_init libssh2_exit \ + libssh2_scp_send64 libssh2_session_handshake) if test "x$cross_compiling" != "xyes"; then LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH2" export LD_LIBRARY_PATH @@ -2768,7 +2787,7 @@ if test X"$want_h2" != Xno; then CPPFLAGS="$CPPFLAGS $CPP_H2" LIBS="$LIB_H2 $LIBS" - AC_CHECK_LIB(nghttp2, nghttp2_session_callbacks_set_send_callback, + AC_CHECK_LIB(nghttp2, nghttp2_session_client_new, [ AC_CHECK_HEADERS(nghttp2/nghttp2.h, curl_h2_msg="enabled (nghttp2)" @@ -3275,39 +3294,6 @@ if test "$want_tls_srp" = "yes" && ( test "x$HAVE_GNUTLS_SRP" = "x1" || test "x$ fi dnl ************************************************************ -dnl disable Unix domain sockets support -dnl -AC_MSG_CHECKING([whether to enable Unix domain sockets]) -AC_ARG_ENABLE(unix-sockets, -AC_HELP_STRING([--enable-unix-sockets],[Enable Unix domain sockets]) -AC_HELP_STRING([--disable-unix-sockets],[Disable Unix domain sockets]), -[ case "$enableval" in - no) AC_MSG_RESULT(no) - want_unix_sockets=no - ;; - *) AC_MSG_RESULT(yes) - want_unix_sockets=yes - ;; - esac ], [ - AC_MSG_RESULT(auto) - want_unix_sockets=auto - ] -) -if test "x$want_unix_sockets" != "xno"; then - AC_CHECK_MEMBER([struct sockaddr_un.sun_path], [ - AC_DEFINE(USE_UNIX_SOCKETS, 1, [Use Unix domain sockets]) - AC_SUBST(USE_UNIX_SOCKETS, [1]) - curl_unix_sockets_msg="enabled" - ], [ - if test "x$want_unix_sockets" = "xyes"; then - AC_MSG_ERROR([--enable-unix-sockets is not available on this platform!]) - fi - ], [ - #include - ]) -fi - -dnl ************************************************************ dnl disable cookies support dnl AC_MSG_CHECKING([whether to enable support for cookies]) @@ -3390,9 +3376,6 @@ fi if test "x$IPV6_ENABLED" = "x1"; then SUPPORT_FEATURES="$SUPPORT_FEATURES IPv6" fi -if test "x$USE_UNIX_SOCKETS" = "x1"; then - SUPPORT_FEATURES="$SUPPORT_FEATURES UnixSockets" -fi if test "x$HAVE_LIBZ" = "x1"; then SUPPORT_FEATURES="$SUPPORT_FEATURES libz" fi @@ -3405,34 +3388,17 @@ fi if test "x$USE_WINDOWS_SSPI" = "x1"; then SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI" fi - -if test "x$HAVE_GSSAPI" = "x1"; then - SUPPORT_FEATURES="$SUPPORT_FEATURES GSS-API" -fi - -if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" -a \ - \( "x$HAVE_GSSAPI" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \); then - SUPPORT_FEATURES="$SUPPORT_FEATURES SPNEGO" -fi - -if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" -a \ - \( "x$HAVE_GSSAPI" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \); then - SUPPORT_FEATURES="$SUPPORT_FEATURES Kerberos" -fi - -if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1"; then +if test "x$CURL_DISABLE_HTTP" != "x1" -a \ + "x$CURL_DISABLE_CRYPTO_AUTH" != "x1"; then if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \ -o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1" \ -o "x$DARWINSSL_ENABLED" = "x1"; then SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM" - - if test "x$CURL_DISABLE_HTTP" != "x1" -a \ - "x$NTLM_WB_ENABLED" = "x1"; then + if test "x$NTLM_WB_ENABLED" = "x1"; then SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM_WB" fi fi fi - if test "x$USE_TLS_SRP" = "x1"; then SUPPORT_FEATURES="$SUPPORT_FEATURES TLS-SRP" fi @@ -3440,6 +3406,12 @@ fi if test "x$USE_NGHTTP2" = "x1"; then SUPPORT_FEATURES="$SUPPORT_FEATURES HTTP2" fi +if test "x$curl_spnego_msg" = "xenabled"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES SPNEGO" +fi +if test "x$want_gss" = "xyes"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES GSS-API" +fi AC_SUBST(SUPPORT_FEATURES) @@ -3492,16 +3464,6 @@ if test "x$CURL_DISABLE_IMAP" != "x1"; then SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IMAPS" fi fi -if test "x$CURL_DISABLE_SMB" != "x1" \ - -a "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" \ - -a \( "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \ - -o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1" \ - -o "x$DARWINSSL_ENABLED" = "x1" \); then - SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMB" - if test "x$SSL_ENABLED" = "x1"; then - SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMBS" - fi -fi if test "x$CURL_DISABLE_SMTP" != "x1"; then SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMTP" if test "x$SSL_ENABLED" = "x1"; then @@ -3598,10 +3560,10 @@ AC_MSG_NOTICE([Configured to build curl/libcurl: SSH support: ${curl_ssh_msg} zlib support: ${curl_zlib_msg} GSS-API support: ${curl_gss_msg} + SPNEGO support: ${curl_spnego_msg} TLS-SRP support: ${curl_tls_srp_msg} resolver: ${curl_res_msg} - IPv6 support: ${curl_ipv6_msg} - Unix sockets support: ${curl_unix_sockets_msg} + ipv6 support: ${curl_ipv6_msg} IDN support: ${curl_idn_msg} Build libcurl: Shared=${enable_shared}, Static=${enable_static} Built-in manual: ${curl_manual_msg} diff --git a/contributors.sh b/contributors.sh index cb5a329..41f9cb1 100755 --- a/contributors.sh +++ b/contributors.sh @@ -25,10 +25,6 @@ # This script shows all mentioned contributors from until HEAD. To aid # when writing RELEASE-NOTES and THANKS. # -# Use --releasenotes to also include the names from the existing RELEASE-NOTES -# file, which is handy when we've added names manually in there that should be -# included in an updated list. -# start=$1 @@ -38,35 +34,17 @@ fi # filter out Author:, Commit: and *by: lines # cut off the email parts -# split list of names at comma -# split list of names at " and " # cut off spaces first and last on the line -# filter alternatives through THANKS-filter # only count names with a space (ie more than one word) # sort all unique names # awk them into RELEASE-NOTES format -( git log $start..HEAD | \ -egrep -i '(Author|Commit|by):' | \ +egrep '(Author|Commit|by):' | \ cut -d: -f2- | \ cut '-d<' -f1 | \ -tr , '\012' | \ -sed 's/ and /\n/' | \ -sed -e 's/^ //' -e 's/ $//g' - -if echo "$*" | grep -qw -- '--releasenotes';then - # if --releasenotes was used - # grep out the list of names from RELEASE-NOTES - # split on ", " - # remove leading white spaces -grep "^ [^ ]" RELEASE-NOTES| \ -sed 's/, */\n/g'| \ -sed 's/^ *//' -fi -)| \ -sed -f ./docs/THANKS-filter | \ +sed -e 's/^ //' -e 's/ $//g' | \ grep ' ' | \ -sort -fu | \ +sort -u | awk '{ num++; n = sprintf("%s%s%s,", n, length(n)?" ":"", $0); diff --git a/curl.manifest b/curl.manifest deleted file mode 100644 index 75b0fa5..0000000 --- a/curl.manifest +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/docs/BINDINGS b/docs/BINDINGS index d4cf488..466c36b 100644 --- a/docs/BINDINGS +++ b/docs/BINDINGS @@ -128,11 +128,6 @@ Mono libcurl-net by Jeffrey Phillips http://sourceforge.net/projects/libcurl-net/ -node.js - - node-libcurl by Jonathan Cardoso Machado - https://github.com/JCMais/node-libcurl - Object-Pascal Free Pascal, Delphi and Kylix binding written by Christophe Espern. diff --git a/docs/FAQ b/docs/FAQ index 043b7bb..0850bd4 100644 --- a/docs/FAQ +++ b/docs/FAQ @@ -80,7 +80,6 @@ FAQ 4.17 Non-functional connect timeouts on Windows 4.18 file:// URLs containing drive letters (Windows, NetWare) 4.19 Why doesn't cURL return an error when the network cable is unplugged? - 4.20 curl doesn't return error for HTTP non-200 responses! 5. libcurl Issues 5.1 Is libcurl thread-safe? @@ -134,14 +133,14 @@ FAQ A free and easy-to-use client-side URL transfer library, supporting DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, - POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET and TFTP. + POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP. libcurl supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading, - Kerberos, SPNEGO, HTTP form based upload, proxies, cookies, user+password + kerberos, HTTP form based upload, proxies, cookies, user+password authentication, file transfer resume, http proxy tunneling and more! libcurl is highly portable, it builds and works identically on numerous - platforms, including Solaris, NetBSD, FreeBSD, OpenBSD, Darwin, HP-UX, + platforms, including Solaris, NetBSD, FreeBSD, OpenBSD, Darwin, HPUX, IRIX, AIX, Tru64, Linux, UnixWare, HURD, Windows, Amiga, OS/2, BeOS, Mac OS X, Ultrix, QNX, OpenVMS, RISC OS, Novell NetWare, DOS, Symbian, OSF, Android, Minix, IBM TPF and more... @@ -156,10 +155,7 @@ FAQ Since curl uses libcurl, curl supports the same wide range of common Internet protocols that libcurl does. - 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 + We pronounce curl and cURL with an initial k sound: [kurl]. 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 @@ -242,10 +238,10 @@ FAQ 1.6 What do you get for making curl? Project cURL is entirely free and open. No person gets paid for developing - curl on full time. We do this voluntarily, mostly on spare time. - Occasionally companies pay individual developers to work on curl, but that's - up to each company and developer. It is not controlled by nor supervised in - any way by the project. + (lib)curl on full or even part time. We do this voluntarily on our spare + time. Occasionally companies pay individual developers to work on curl, but + that's up to each company and developer. It is not controlled by nor + supervised in any way by the project. We still get help from companies. Haxx provides web site, bandwidth, mailing lists etc, sourceforge.net hosts project services we take advantage from, @@ -427,7 +423,7 @@ FAQ curl can be built to use one of the following SSL alternatives: OpenSSL, GnuTLS, yassl, NSS, PolarSSL, axTLS, Secure Transport (native iOS/OS X), - WinSSL (native Windows) or GSKit (native IBM i). They all have their pros + WinSSL (native Windows) or qssl (native IBM i). They all have their pros and cons, and we try to maintain a comparison of them here: http://curl.haxx.se/docs/ssl-compared.html @@ -1090,31 +1086,7 @@ FAQ immediately if its lone network connection goes down. That can be achieved by having the application monitor the network connection on its own using an OS-specific mechanism, then signalling libcurl to abort (see also item 5.13). - - 4.20 curl doesn't return error for HTTP non-200 responses! - - Correct. Unless you use -f (--fail). - - When doing HTTP transfers, curl will perform exactly what you're asking it - to do and if successful it will not return an error. You can use curl to - test your web server's "file not found" page (that gets 404 back), you can - use it to check your authentication protected web pages (that get a 401 - back) and so on. - - The specific HTTP response code does not constitute a problem or error for - curl. It simply sends and delivers HTTP as you asked and if that worked, - everything is fine and dandy. The response code is generally providing more - higher level error information that curl doesn't care about. The error was - not in the HTTP transfer. - - If you want your command line to treat error codes in the 400 and up range - as errors and thus return a non-zero value and possibly show an error - message, curl has a dedicated option for that: -f (CURLOPT_FAILONERROR in - libcurl speak). - - You can also use the -w option and the variable %{response_code} to extract - the exact response code that was return in the response. - + 5. libcurl Issues @@ -1274,7 +1246,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 out of four host name resolve calls + - The non-ipv6 resolver that can use one out of four host name resolve calls (depending on what your system supports): A - gethostbyname() @@ -1282,15 +1254,15 @@ FAQ C - gethostbyname_r() with 5 arguments D - gethostbyname_r() with 6 arguments - - The IPv6-resolver that uses getaddrinfo() + - The ipv6-resolver that uses getaddrinfo() - The c-ares based name resolver that uses the c-ares library for resolves. Using this offers asynchronous name resolves. - The threaded resolver (default option on Windows). It uses: - A - gethostbyname() on plain IPv4 hosts - B - getaddrinfo() on IPv6 enabled hosts + A - gethostbyname() on plain ipv4 hosts + B - getaddrinfo() on ipv6-enabled hosts Also note that libcurl never resolves or reverse-lookups addresses given as pure numbers, such as 127.0.0.1 or ::1. diff --git a/docs/FEATURES b/docs/FEATURES index a674002..8062864 100644 --- a/docs/FEATURES +++ b/docs/FEATURES @@ -28,7 +28,7 @@ libcurl - selectable network interface for outgoing traffic - IPv6 support on unix and Windows - persistent connections - - socks 4 + 5 support, with or without local name resolving + - socks5 support - supports user name and password in proxy environment variables - operations through proxy "tunnel" (using CONNECT) - support for large files (>2GB and >4GB) during upload and download @@ -45,8 +45,8 @@ HTTP - POST - Pipelining - multipart formpost (RFC1867-style) - - authentication: Basic, Digest, NTLM (*9) and Negotiate (SPNEGO) (*3) - to server and proxy + - authentication: Basic, Digest, NTLM (*9), GSS-Negotiate/Negotiate (*3) and + SPNEGO (*4) to server and proxy - resume (both GET and PUT) - follow redirects - maximum amount of redirects to follow @@ -64,7 +64,6 @@ HTTP - Content-Encoding support for deflate and gzip - "Transfer-Encoding: chunked" support in uploads - data compression (*12) - - HTTP/2 (*5) HTTPS (*1) - (all the HTTP features) @@ -77,7 +76,8 @@ HTTPS (*1) FTP - download - authentication - - Kerberos 5 (*14) + - kerberos4 (*5) + - kerberos5 (*3) - active/passive using PORT, EPRT, PASV or EPSV - single file size information (compare to HTTP HEAD) - 'type=' URL support @@ -127,15 +127,8 @@ FILE - upload - resume -SMB - - SMBv1 over TCP and SSL - - download - - upload - - authentication with NTLMv1 - SMTP - - authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (*9) and Kerberos 5 - (*4) + - authentication: Plain, Login, CRAM-MD5, Digest-MD5 and NTLM (*9) - send e-mails - mail from support - mail size support @@ -150,8 +143,8 @@ SMTPS (*1) POP3 - authentication: Clear Text, APOP and SASL - - SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (*9) and - Kerberos 5 (*4) + - SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5 and + NTLM (*9) - list e-mails - retrieve e-mails - enhanced command support for: CAPA, DELE, TOP, STAT, UIDL and NOOP via @@ -165,8 +158,8 @@ POP3S (*1) IMAP - authentication: Clear Text and SASL - - SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (*9) and - Kerberos 5 (*4) + - SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5 and + NTLM (*9) - list the folders of a mailbox - select a mailbox with support for verifying the UIDVALIDITY - fetch e-mails with support for specifying the UID and SECTION @@ -184,15 +177,13 @@ FOOTNOTES ========= *1 = requires OpenSSL, GnuTLS, NSS, yassl, axTLS, PolarSSL, WinSSL (native - Windows), Secure Transport (native iOS/OS X) or GSKit (native IBM i) + Windows), Secure Transport (native iOS/OS X) or qssl (native IBM i) *2 = requires OpenLDAP - *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 - currently supported - *5 = requires nghttp2 and possibly a recent TLS library + *3 = requires a GSSAPI-compliant library, such as Heimdal or similar + *4 = requires FBopenssl + *5 = requires a krb4 library, such as the MIT one or similar *6 = requires c-ares - *7 = requires OpenSSL, NSS, GSKit, WinSSL or Secure Transport; GnuTLS, for + *7 = requires OpenSSL, NSS, qssl, WinSSL or Secure Transport; GnuTLS, for example, only supports SSLv3 and TLSv1 *8 = requires libssh2 *9 = requires OpenSSL, GnuTLS, NSS, yassl, Secure Transport or SSPI (native @@ -203,4 +194,3 @@ FOOTNOTES *12 = requires libz *13 = requires libmetalink, and either an Apple or Microsoft operating system, or OpenSSL, or GnuTLS, or NSS - *14 = requires a GSS-API implementation (such as Heimdal or MIT Kerberos) diff --git a/docs/HISTORY b/docs/HISTORY index e76e5b9..3c14099 100644 --- a/docs/HISTORY +++ b/docs/HISTORY @@ -4,31 +4,23 @@ | (__| |_| | _ <| |___ \___|\___/|_| \_\_____| -How cURL Became Like This -========================= + How cURL Became Like This -Towards the end of 1996, Daniel Stenberg was spending time writing an IRC bot -for an Amiga related channel on EFnet. He then came up with the idea to make + +Towards the end of 1996, Daniel Stenberg came up with the idea to make currency-exchange calculations available to Internet Relay Chat (IRC) users. All the necessary data are published on the Web; he just needed to automate their retrieval. Daniel simply adopted an existing command-line open-source tool, httpget, that Brazilian Rafael Sagula had written and recently release version 0.1 of. After -a few minor adjustments, it did just what he needed. - -1997 ----- - -HttpGet 1.0 was released on April 8th 1997 with brand new HTTP proxy support. +a few minor adjustments, it did just what he needed. HttpGet 1.0 was released +on April 8th 1997 with brand new HTTP proxy support. We soon found and fixed support for getting currencies over GOPHER. Once FTP download support was added, the name of the project was changed and urlget 2.0 was released in August 1997. The http-only days were already passed. -1998 ----- - The project slowly grew bigger. When upload capabilities were added and the name once again was misleading, a second name change was made and on March 20, 1998 curl 4 was released. (The version numbering from the previous names was @@ -41,39 +33,33 @@ was revealed to us much later.) SSL support was added, powered by the SSLeay library. -August, first announcement of curl on freshmeat.net. +August 1998, first announcement of curl on freshmeat.net. -October, with the curl 4.9 release and the introduction of cookie support, -curl was no longer released under the GPL license. Now we're at 4000 lines of -code, we switched over to the MPL license to restrict the effects of +October 1998, with the curl 4.9 release and the introduction of cookie +support, curl was no longer released under the GPL license. Now we're at 4000 +lines of code, we switched over to the MPL license to restrict the effects of "copyleft". -November, configure script and reported successful compiles on several +November 1998, configure script and reported successful compiles on several major operating systems. The never-quite-understood -F option was added and curl could now simulate quite a lot of a browser. TELNET support was added. Curl 5 was released in December 1998 and introduced the first ever curl man page. People started making Linux RPM packages out of it. -1999 ----- - -January, DICT support added. +January 1999, DICT support added. OpenSSL took over where SSLeay was abandoned. -May, first Debian package. +May 1999, first Debian package. -August, LDAP:// and FILE:// support added. The curl web site gets 1300 visits -weekly. +August 1999, LDAP:// and FILE:// support added. The curl web site gets 1300 +visits weekly. Released curl 6.0 in September. 15000 lines of code. -December 28, added the project on Sourceforge and started using its services -for managing the project. - -2000 ----- +December 28 1999, added the project on Sourceforge and started using its +services for managing the project. Spring 2000, major internal overhaul to provide a suitable library interface. The first non-beta release was named 7.1 and arrived in August. This offered @@ -81,22 +67,19 @@ the easy interface and turned out to be the beginning of actually getting other software and programs to get based on and powered by libcurl. Almost 20000 lines of code. -August, the curl web site gets 4000 visits weekly. +August 2000, the curl web site gets 4000 visits weekly. The PHP guys adopted libcurl already the same month, when the first ever third party libcurl binding showed up. CURL has been a supported module in PHP since the release of PHP 4.0.2. This would soon get followers. More than 16 different bindings exist at the time of this writing. -September, kerberos4 support was added. - -In November started the work on a test suite for curl. It was later re-written -from scratch again. The libcurl major SONAME number was set to 1. +September 2000, kerberos4 support was added. -2001 ----- +In November 2000 started the work on a test suite for curl. It was later +re-written from scratch again. The libcurl major SONAME number was set to 1. -January, Daniel released curl 7.5.2 under a new license again: MIT (or +January 2001, Daniel released curl 7.5.2 under a new license again: MIT (or MPL). The MIT license is extremely liberal and can be used combined with GPL in other projects. This would finally put an end to the "complaints" from people involved in GPLed projects that previously were prohibited from using @@ -109,20 +92,17 @@ code. The libcurl major SONAME number was bumped to 2 due to this overhaul. The first experimental ftps:// support was added in March 2001. -August. curl is bundled in Mac OS X, 10.1. It was already becoming more and -more of a standard utility of Linux distributions and a regular in the BSD +August 2001. curl is bundled in Mac OS X, 10.1. It was already becoming more +and more of a standard utility of Linux distributions and a regular in the BSD ports collections. The curl web site gets 8000 visits weekly. Curl Corporation contacted Daniel to discuss "the name issue". After Daniel's reply, they have never since got in touch again. -September, libcurl 7.9 introduces cookie jar and curl_formadd(). During the -forthcoming 7.9.x releases, we introduced the multi interface slowly and +September 2001, libcurl 7.9 introduces cookie jar and curl_formadd(). During +the forthcoming 7.9.x releases, we introduced the multi interface slowly and without much whistles. -2002 ----- - -June, the curl web site gets 13000 visits weekly. curl and libcurl is +June 2002, the curl web site gets 13000 visits weekly. curl and libcurl is 35000 lines of code. Reported successful compiles on more than 40 combinations of CPUs and operating systems. @@ -131,152 +111,134 @@ impossible. Around 5000 downloaded packages each week from the main site gives a hint, but the packages are mirrored extensively, bundled with numerous OS distributions and otherwise retrieved as part of other software. -September, with the release of curl 7.10 it is released under the MIT license -only. - -2003 ----- +September 2002, with the release of curl 7.10 it is released under the MIT +license only. -January. Started working on the distributed curl tests. The autobuilds. +January 2003. Started working on the distributed curl tests. The autobuilds. -February, the curl site averages at 20000 visits weekly. At any given moment, -there's an average of 3 people browsing the curl.haxx.se site. +February 2003, the curl site averages at 20000 visits weekly. At any given +moment, there's an average of 3 people browsing the curl.haxx.se site. Multiple new authentication schemes are supported: Digest (May), NTLM (June) and Negotiate (June). -November: curl 7.10.8 is released. 45000 lines of code. ~55000 unique visitors -to the curl.haxx.se site. Five official web mirrors. +November 2003: curl 7.10.8 is released. 45000 lines of code. ~55000 unique +visitors to the curl.haxx.se site. Five official web mirrors. -December, full-fledged SSL for FTP is supported. +December 2003, full-fledged SSL for FTP is supported. -2004 ----- +January 2004: curl 7.11.0 introduced large file support. -January: curl 7.11.0 introduced large file support. +June 2004: -June: curl 7.12.0 introduced IDN support. 10 official web mirrors. + curl 7.12.0 introduced IDN support. 10 official web mirrors. -This release bumped the major SONAME to 3 due to the removal of the -curl_formparse() function + This release bumped the major SONAME to 3 due to the removal of the + curl_formparse() function -August: Curl and libcurl 7.12.1 +August 2004: + Curl and libcurl 7.12.1 - Public curl release number: 82 - Releases counted from the very beginning: 109 - Available command line options: 96 - Available curl_easy_setopt() options: 120 - Number of public functions in libcurl: 36 - Amount of public web site mirrors: 12 - Number of known libcurl bindings: 26 + Public curl release number: 82 + Releases counted from the very beginning: 109 + Available command line options: 96 + Available curl_easy_setopt() options: 120 + Number of public functions in libcurl: 36 + Amount of public web site mirrors: 12 + Number of known libcurl bindings: 26 -2005 ----- +April 2005: -April. GnuTLS can now optionally be used for the secure layer when curl is -built. + GnuTLS can now optionally be used for the secure layer when curl is built. -September: TFTP support was added. +September 2005: -More than 100,000 unique visitors of the curl web site. 25 mirrors. + TFTP support was added. -December: security vulnerability: libcurl URL Buffer Overflow + More than 100,000 unique visitors of the curl web site. 25 mirrors. -2006 ----- +December 2005: -January. We dropped support for Gopher. We found bugs in the implementation -that turned out having been introduced years ago, so with the conclusion that -nobody had found out in all this time we removed it instead of fixing it. + security vulnerability: libcurl URL Buffer Overflow -March: security vulnerability: libcurl TFTP Packet Buffer Overflow +January 2006: -April: Added the multi_socket() API + We dropped support for Gopher. We found bugs in the implementation that + turned out having been introduced years ago, so with the conclusion that + nobody had found out in all this time we removed it instead of fixing it. -September: The major SONAME number for libcurl was bumped to 4 due to the -removal of ftp third party transfer support. +March 2006: -November: Added SCP and SFTP support + security vulnerability: libcurl TFTP Packet Buffer Overflow -2007 ----- +April 2006: -February: Added support for the Mozilla NSS library to do the SSL/TLS stuff + Added the multi_socket() API -July: security vulnerability: libcurl GnuTLS insufficient cert verification +September 2006: -2008 ----- + The major SONAME number for libcurl was bumped to 4 due to the removal of + ftp third party transfer support. -November: +November 2006: - Command line options: 128 - curl_easy_setopt() options: 158 - Public functions in libcurl: 58 - Known libcurl bindings: 37 - Contributors: 683 - - 145,000 unique visitors. >100 GB downloaded. + Added SCP and SFTP support -2009 ----- +February 2007: -March: security vulnerability: libcurl Arbitrary File Access + Added support for the Mozilla NSS library to do the SSL/TLS stuff -August: security vulnerability: libcurl embedded zero in cert name +July 2007: -December: Added support for IMAP, POP3 and SMTP + security vulnerability: libcurl GnuTLS insufficient cert verification -2010 ----- +November 2008: -January: Added support for RTSP + Command line options: 128 + curl_easy_setopt() options: 158 + Public functions in libcurl: 58 + Known libcurl bindings: 37 + Contributors: 683 -February: security vulnerability: libcurl data callback excessive length + 145,000 unique visitors. >100 GB downloaded. -March: The project switched over to use git (hosted by github) instead of CVS -for source code control +March 2009: -May: Added support for RTMP + security vulnerability: libcurl Arbitrary File Access -Added support for PolarSSL to do the SSL/TLS stuff +August 2009: -August: + security vulnerability: libcurl embedded zero in cert name - Public curl releases: 117 - Command line options: 138 - curl_easy_setopt() options: 180 - Public functions in libcurl: 58 - Known libcurl bindings: 39 - Contributors: 808 +December 2009: - Gopher support added (re-added actually) + Added support for IMAP, POP3 and SMTP -2012 ----- +January 2010: - July: Added support for Schannel (native Windows TLS backend) and Darwin SSL - (Native Mac OS X and iOS TLS backend). + Added support for RTSP - Supports metalink +February 2010: - October: SSH-agent support. + security vulnerability: libcurl data callback excessive length -2013 ----- +March 2010: - February: Cleaned up internals to always uses the "multi" non-blocking - approach internally and only expose the blocking API with a wrapper. + The project switched over to use git instead of CVS for source code control - September: First small steps on supporting HTTP/2 with nghttp2. +May 2010: - October: Removed krb4 support. + Added support for RTMP - December: Happy eyeballs. + Added support for PolarSSL to do the SSL/TLS stuff -2014 ----- +August 2010: - March: first real release supporting HTTP/2 + Public curl releases: 117 + Command line options: 138 + curl_easy_setopt() options: 180 + Public functions in libcurl: 58 + Known libcurl bindings: 39 + Contributors: 808 - September: Web site had 245,000 unique visitors and served 236GB data + Gopher support added (re-added actually) diff --git a/docs/INSTALL b/docs/INSTALL index 30dec53..86f99dd 100644 --- a/docs/INSTALL +++ b/docs/INSTALL @@ -20,10 +20,9 @@ Building from git If you get your code off a git repository, see the GIT-INFO file in the root directory for specific instructions on how to proceed. -Unix +UNIX ==== - - A normal Unix installation is made in three or four steps (after you've + A normal unix installation is made in three or four steps (after you've unpacked the source archive): ./configure @@ -137,8 +136,8 @@ Unix To build with axTLS for SSL/TLS, use both --without-ssl and --with-axtls. - To build with GSS-API support, use --with-gssapi and have the MIT Kerberos - or Heimdal packages installed. + To get GSSAPI support, build with --with-gssapi and have the MIT or + Heimdal Kerberos 5 packages installed. To get support for SCP and SFTP, build with --with-libssh2 and have libssh2 0.16 or later installed. @@ -148,7 +147,6 @@ Unix SPECIAL CASES ------------- - Some versions of uClibc require configuring with CPPFLAGS=-D_GNU_SOURCE=1 to get correct large file support. @@ -157,6 +155,7 @@ Unix ./configure CC=owcc AR="$WATCOM/binl/wlib" AR_FLAGS=-q \ RANLIB=/bin/true STRIP="$WATCOM/binl/wstrip" CFLAGS=-Wextra + Win32 ===== @@ -188,6 +187,7 @@ Win32 If you get linkage errors read section 5.7 of the FAQ document. + MingW32 ------- @@ -209,7 +209,7 @@ Win32 environment variables, for example: set ZLIB_PATH=c:\zlib-1.2.8 - set OPENSSL_PATH=c:\openssl-0.9.8zc + set OPENSSL_PATH=c:\openssl-0.9.8y set LIBSSH2_PATH=c:\libssh2-1.4.3 ATTENTION: if you want to build with libssh2 support you have to use latest @@ -234,6 +234,7 @@ Win32 - optional recent Novell CLDAP SDK available from: http://developer.novell.com/ndk/cldap.htm + Cygwin ------ @@ -317,7 +318,7 @@ Win32 Before running nmake define the OPENSSL_PATH environment variable with the root/base directory of OpenSSL, for example: - set OPENSSL_PATH=c:\openssl-0.9.8zc + set OPENSSL_PATH=c:\openssl-0.9.8y Then run 'nmake vc-ssl' or 'nmake vc-ssl-dll' in curl's root directory. 'nmake vc-ssl' will create a libcurl static and dynamic @@ -388,6 +389,7 @@ Win32 is required, as well as the OpenSSL libeay32.lib and ssleay32.lib libraries. + OTHER MSVC IDEs --------------- @@ -398,6 +400,7 @@ Win32 Make the sources in the src/ drawer be a "win32 console application" project. Name it curl. + Disabling Specific Protocols in Win32 builds -------------------------------------------- @@ -416,21 +419,16 @@ Win32 CURL_DISABLE_FILE disables FILE CURL_DISABLE_TFTP disables TFTP CURL_DISABLE_HTTP disables HTTP - CURL_DISABLE_IMAP disables IMAP - CURL_DISABLE_POP3 disables POP3 - CURL_DISABLE_SMTP disables SMTP - If you want to set any of these defines you have the following options: + If you want to set any of these defines you have the following + possibilities: - Modify lib/config-win32.h - Modify lib/curl_setup.h - Modify lib/Makefile.vc6 - - Modify the "Preprocessor Definitions" in the libcurl project + - Add defines to Project/Settings/C/C++/General/Preprocessor Definitions + in the vc6libcurl.dsw/vc6libcurl.dsp Visual C++ 6 IDE project. - Note: The pre-processor settings can be found using the Visual Studio IDE - under "Project -> Settings -> C/C++ -> General" in VC6 and "Project -> - Properties -> Configuration Properties -> C/C++ -> Preprocessor" in later - versions. Using BSD-style lwIP instead of Winsock TCP/IP stack in Win32 builds -------------------------------------------------------------------- @@ -442,12 +440,8 @@ Win32 - Modify lib/config-win32.h and src/config-win32.h - Modify lib/Makefile.vc6 - - Modify the "Preprocessor Definitions" in the libcurl project - - Note: The pre-processor settings can be found using the Visual Studio IDE - under "Project -> Settings -> C/C++ -> General" in VC6 and "Project -> - Properties -> Configuration Properties -> C/C++ -> Preprocessor" in later - versions. + - Add definition to Project/Settings/C/C++/General/Preprocessor Definitions + in the vc6libcurl.dsw/vc6libcurl.dsp Visual C++ 6 IDE project. Once that libcurl has been built with BSD-style lwIP TCP/IP stack support, in order to use it with your program it is mandatory that your program @@ -471,9 +465,9 @@ Win32 add '-DCURL_STATICLIB' to your CFLAGS. Otherwise the linker will look for dynamic import symbols. + Apple iOS and Mac OS X ====================== - On recent Apple operating systems, curl can be built to use Apple's SSL/TLS implementation, Secure Transport, instead of OpenSSL. To build with Secure Transport for SSL/TLS, use the configure option --with-darwinssl. (It @@ -503,9 +497,9 @@ Apple iOS and Mac OS X ./configure --with-darwinssl make + IBM OS/2 ======== - Building under OS/2 is not much different from building under unix. You need: @@ -533,9 +527,9 @@ IBM OS/2 If you're getting huge binaries, probably your makefiles have the -g in CFLAGS. + VMS === - (The VMS section is in whole contributed by the friendly Nico Baggus) Curl seems to work with FTP & HTTP other protocols are not tested. (the @@ -580,7 +574,6 @@ VMS the name can be fetched from external or internal message libraries Error code - the err codes assigned by the application Sev. - severity: Even = error, off = non error - 0 = Warning 1 = Success 2 = Error @@ -602,13 +595,12 @@ VMS Compaq C V6.2-003 on OpenVMS Alpha V7.1-1H2 So far for porting notes as of: - 13-jul-2001 N. Baggus + QNX === - (This section was graciously brought to us by David Bentham) As QNX is targeted for resource constrained environments, the QNX headers @@ -619,12 +611,11 @@ QNX A good all-round solution to this is to override the default when building libcurl, by overriding CFLAGS during configure, example - # configure CFLAGS='-DFD_SETSIZE=64 -g -O2' + RISC OS ======= - The library can be cross-compiled using gccsdk as follows: CC=riscos-gcc AR=riscos-ar RANLIB='riscos-ar -s' ./configure \ @@ -634,9 +625,9 @@ RISC OS where riscos-gcc and riscos-ar are links to the gccsdk tools. You can then link your program with curl/lib/.libs/libcurl.a + AmigaOS ======= - (This section was graciously brought to us by Diego Casorran) To build cURL/libcurl on AmigaOS just type 'make amiga' ... @@ -656,11 +647,10 @@ AmigaOS To enable SSL support, you need a OpenSSL native version (without ixemul), you can find a precompiled package at http://amiga.sourceforge.net/OpenSSL/ + NetWare ======= - To compile curl.nlm / libcurl.nlm you need: - - either any gcc / nlmconv, or CodeWarrior 7 PDK 4 or later. - gnu make and awk running on the platform you compile on; native Win32 versions can be downloaded from: @@ -701,9 +691,9 @@ NetWare the status of these builds can be viewed at the autobuild table: http://curl.haxx.se/dev/builds.html + eCos ==== - curl does not use the eCos build system, so you must first build eCos separately, then link curl to the resulting eCos library. Here's a sample configure line to do so on an x86 Linux box targeting x86: @@ -771,9 +761,9 @@ eCos config.errors = stderr; /* default errors to stderr */ + Minix ===== - curl can be compiled on Minix 3 using gcc or ACK (starting with ver. 3.1.3). Ensure that GNU gawk and bash are both installed and available in the PATH. @@ -803,9 +793,9 @@ Minix make chmem =256000 src/curl + Symbian OS ========== - The Symbian OS port uses the Symbian build system to compile. From the packages/Symbian/group/ directory, run: @@ -816,9 +806,9 @@ Symbian OS SDK doesn't include support for P.I.P.S., you will need to contact your SDK vendor to obtain that first. + VxWorks ======== - Build for VxWorks is performed using cross compilation. That means you build on Windows machine using VxWorks tools and run the built image on the VxWorks device. @@ -842,15 +832,13 @@ VxWorks As a result the libcurl.a library should be created in the 'lib' folder. To clean the build results type 'make -f ./Makefile.vxworks clean'. + Android ======= - Method using the static makefile: - - see the build notes in the packages/Android/Android.mk file. Method using a configure cross-compile (tested with Android NDK r7c, r8): - - prepare the toolchain of the Android NDK for standalone use; this can be done by invoking the script: ./build/tools/make-standalone-toolchain.sh @@ -872,8 +860,7 @@ Android found in your automake folder: find /usr -name config.sub - Wrapper for pkg-config: - + Wrapper for pkg-config - In order to make proper use of pkg-config so that configure is able to find all dependencies you should create a wrapper script for pkg-config; file /opt/arm-linux-androideabi-4.4.3/bin/arm-linux-androideabi-pkg-config: @@ -887,9 +874,9 @@ Android also create a copy or symlink with name arm-unknown-linux-androideabi-pkg-config. + CROSS COMPILE ============= - (This section was graciously brought to us by Jim Duey, with additions by Dan Fandrich) @@ -935,9 +922,9 @@ CROSS COMPILE ./configure --host=ARCH-OS + REDUCING SIZE ============= - There are a number of configure options that can be used to reduce the size of libcurl for embedded applications where binary size is an important factor. First, be sure to set the CFLAGS variable when @@ -974,7 +961,6 @@ REDUCING SIZE size of the libcurl dynamic libraries on some platforms even further. Specify them by providing appropriate CFLAGS and LDFLAGS variables on the configure command-line, e.g. - CFLAGS="-Os -ffunction-sections -fdata-sections \ -fno-unwind-tables -fno-asynchronous-unwind-tables" \ LDFLAGS="-Wl,-s -Wl,-Bsymbolic -Wl,--gc-sections" @@ -1003,9 +989,9 @@ REDUCING SIZE --disable-manual !--manual --disable-proxy !HTTP\ proxy !proxytunnel !SOCKS4 !SOCKS5 + PORTS ===== - This is a probably incomplete list of known hardware and operating systems that curl has been compiled for. If you know a system curl compiles and runs on, that isn't listed, please let us know! diff --git a/docs/INSTALL.cmake b/docs/INSTALL.cmake index b2924e6..f5d32d8 100644 --- a/docs/INSTALL.cmake +++ b/docs/INSTALL.cmake @@ -24,6 +24,7 @@ Current flaws in the curl CMake build Missing features in the cmake build: - Builds libcurl without large file support + - It doesn't build src/tool_hugehelp.c which creates the --manual output - Can't select which SSL library to build with, only OpenSSL - Doesn't build with SCP and SFTP support (libssh2) - Doesn't allow different resolver backends (no c-ares build support) @@ -31,6 +32,7 @@ Current flaws in the curl CMake build - 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 properly enable IPv6 support by default - Doesn't find or use krb4 or GSS - Rebuilds test files too eagerly, but still can't run the tests diff --git a/docs/INTERNALS b/docs/INTERNALS index f8b1b47..6bf3c92 100644 --- a/docs/INTERNALS +++ b/docs/INTERNALS @@ -14,7 +14,6 @@ INTERNALS GIT === - All changes to the sources are committed to the git repository as soon as they're somewhat verified to work. Changes shall be committed as independently as possible so that individual changes can be easier spotted and tracked @@ -42,13 +41,12 @@ Portability libidn 0.4.1 cyassl 2.0.0 openldap 2.0 - MIT Kerberos 1.2.4 - GSKit V5R3M0 + MIT krb5 lib 1.2.4 + qsossl V5R3M0 NSS 3.14.x axTLS 1.2.7 PolarSSL 1.3.0 Heimdal ? - nghttp2 0.6.0 On systems where configure runs, we aim at working on them all - if they have a suitable C compiler. On systems that don't run configure, we strive to keep @@ -252,9 +250,7 @@ Library Kerberos - Kerberos support is mainly in lib/krb5.c and lib/security.c but also - curl_sasl_sspi.c and curl_sasl_gssapi.c for the email protocols and - socks_gssapi.c & socks_sspi.c for SOCKS5 proxy specifics. + The kerberos support is mainly in lib/krb4.c and lib/security.c. TELNET @@ -264,18 +260,10 @@ Library The file:// protocol is dealt with in lib/file.c. - SMB - - The smb:// protocol is dealt with in lib/smb.c. - LDAP Everything LDAP is in lib/ldap.c and lib/openldap.c - E-mail - - The e-mail related source code is in lib/imap.c, lib/pop3.c and lib/smtp.c. - GENERAL URL encoding and decoding, called escaping and unescaping in the source code, diff --git a/docs/KNOWN_BUGS b/docs/KNOWN_BUGS index 7788567..70e8566 100644 --- a/docs/KNOWN_BUGS +++ b/docs/KNOWN_BUGS @@ -3,9 +3,6 @@ join in and help us correct one or more of these! Also be sure to check the changelog of the current development status, as one or more of these problems may have been fixed since this was written! -88. libcurl doesn't support CURLINFO_FILETIME for SFTP transfers and thus - curl's -R option also doesn't work then. - 87. -J/--remote-header-name doesn't decode %-encoded file names. RFC6266 details how it should be done. The can of worm is basically that we have no charset handling in curl and ascii >=128 is a challenge for us. Not to @@ -54,6 +51,10 @@ may have been fixed since this was written! any file at all. Like when using FTP. http://curl.haxx.se/bug/view.cgi?id=1063 +77. CURLOPT_FORBID_REUSE on a handle prevents NTLM from working since it + "abuses" the underlying connection re-use system and if connections are + forced to close they break the NTLM support. + 76. The SOCKET type in Win64 is 64 bits large (and thus so is curl_socket_t on that platform), and long is only 32 bits. It makes it impossible for curl_easy_getinfo() to return a socket properly with the CURLINFO_LASTSOCKET @@ -200,7 +201,7 @@ may have been fixed since this was written! be to use a data structure other than a plain C string, one that can handle embedded NUL characters. From a practical standpoint, most FTP servers would not meaningfully support NUL characters within RFC 959 , - anyway (e.g., Unix pathnames may not contain NUL). + anyway (e.g., UNIX pathnames may not contain NUL). 14. 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 @@ -215,9 +216,9 @@ may have been fixed since this was written! acknowledged after the actual TCP connect (during the SOCKS "negotiate" phase). -10. To get HTTP Negotiate (SPNEGO) authentication to work fine, you need to - provide a (fake) user name (this concerns both curl and the lib) because the - code wrongly only considers authentication if there's a user name provided. +10. To get HTTP Negotiate authentication to work fine, you need to provide a + (fake) user name (this concerns both curl and the lib) because the code + wrongly only considers authentication if there's a user name provided. http://curl.haxx.se/bug/view.cgi?id=440 How? http://curl.haxx.se/mail/lib-2004-08/0182.html diff --git a/docs/LICENSE-MIXING b/docs/LICENSE-MIXING index a53835c..f596546 100644 --- a/docs/LICENSE-MIXING +++ b/docs/LICENSE-MIXING @@ -21,7 +21,9 @@ announcement clause that collides with GPL. libcurl http://curl.haxx.se/docs/copyright.html Uses an MIT (or Modified BSD)-style license that is as liberal as - possible. + possible. Some of the source files that deal with KRB4 have Original + BSD-style announce-clause licenses. You may not distribute binaries + with krb4-enabled libcurl that also link with GPL-licensed code! OpenSSL http://www.openssl.org/source/license.html @@ -68,6 +70,14 @@ zlib http://www.gzip.org/zlib/zlib_license.html (Used for compressed Transfer-Encoding support) Uses an MIT-style license that shouldn't collide with any other library. +krb4 + + While nothing in particular says that a Kerberos4 library must use any + particular license, the one I've tried and used successfully so far + (kth-krb4) is partly Original BSD-licensed with the announcement + clause. Some of the code in libcurl that is written to deal with + Kerberos4 is Modified BSD-licensed. + MIT Kerberos http://web.mit.edu/kerberos/www/dist/ (May be used for GSS support) MIT licensed, that shouldn't collide @@ -84,6 +94,12 @@ GNU GSS http://www.gnu.org/software/gss/ may not distribute binary curl packages that uses this if you build curl to also link and use any Original BSD licensed libraries! +fbopenssl + + (Used for SPNEGO support) Unclear license. Based on its name, I assume + that it uses the OpenSSL license and thus shares the same issues as + described for OpenSSL above. + libidn http://josefsson.org/libidn/ (Used for IDNA support) Uses the GNU Lesser General Public diff --git a/docs/MAIL-ETIQUETTE b/docs/MAIL-ETIQUETTE index fb50312..ea46986 100644 --- a/docs/MAIL-ETIQUETTE +++ b/docs/MAIL-ETIQUETTE @@ -14,7 +14,6 @@ MAIL ETIQUETTE 1.5 Moderation of new posters 1.6 Handling trolls and spam 1.7 How to unsubscribe - 1.8 I posted, now what? 2. Sending mail 2.1 Reply or New Mail @@ -126,42 +125,6 @@ MAIL ETIQUETTE You NEVER EVER email the mailing list requesting someone else to get you off the list. - 1.8 I posted, now what? - - If you aren't subscribed with the exact same email address that you used to - send the email, your post will just be silently discarded. - - If you posted for the first time to the mailing list, you first need to wait - for an administrator to allow your email to go through. This normally - happens very quickly but in case we're asleep, you may have to wait a few - hours. - - Once your email goes through it is sent out to several hundred or even - thousand recipients. Your email may cover an area that not that many people - know about or are interested in. Or possibly the person who knows about it - is on vacation or under a very heavy work load right now. You have to wait - for a response and you must not expect to get a response at all, but - hopefully you get an answer within a couple of days. - - You do yourself and all of us a service when you include as many details as - possible already in your first email. Mention your operating system and - environment. Tell us which curl version you're using and tell us what you - did, what happened and what you expected would happen. Preferably, show us - what you did in details enough to allow others to help point out the problem - or repeat the same steps in their places. - - Failing to include details will only delay responses and make people respond - and ask for the details and you have to send a follow-up email that includes - them. - - Expect the responses to primarily help YOU debug the issue, or ask you - questions that can lead you or others towards a solution or explanation to - whatever you experience. - - If you are a repeat offender to the guidelines outlined in this document, - chances are that people will ignore you at will and your chances to get - responses will greatly diminish. - 2. Sending mail diff --git a/docs/MANUAL b/docs/MANUAL index 113df20..11960e1 100644 --- a/docs/MANUAL +++ b/docs/MANUAL @@ -41,28 +41,17 @@ SIMPLE USAGE Get a file from an SSH server using SFTP: - curl -u username sftp://example.com/etc/issue + curl -u username sftp://shell.example.com/etc/issue - Get a file from an SSH server using SCP using a private key - (not password-protected) to authenticate: + Get a file from an SSH server using SCP using a private key to authenticate: - curl -u username: --key ~/.ssh/id_rsa \ - scp://example.com/~/file.txt - - Get a file from an SSH server using SCP using a private key - (password-protected) to authenticate: - - curl -u username: --key ~/.ssh/id_rsa --pass private_key_password \ - scp://example.com/~/file.txt + curl -u username: --key ~/.ssh/id_dsa --pubkey ~/.ssh/id_dsa.pub \ + scp://shell.example.com/~/personal.txt Get the main page from an IPv6 web server: curl "http://[2001:1890:1112:1::20]/" - Get a file from an SMB server: - - curl -u "domain\username:passwd" smb://server.example.com/share/file.txt - DOWNLOAD TO A FILE Get a web page and store in a local file with a specific name: @@ -102,13 +91,10 @@ USING PASSWORDS SFTP / SCP - This is similar to FTP, but you can use the --key option to specify a - private key to use instead of a password. Note that the private key may - itself be protected by a password that is unrelated to the login password - of the remote system; this password is specified using the --pass option. - Typically, curl will automatically extract the public key from the private - key file, but in cases where curl does not have the proper library support, - a matching public key file must be specified using the --pubkey option. + This is similar to FTP, but you can specify a private key to use instead of + a password. Note that the private key may itself be protected by a password + that is unrelated to the login password of the remote system. If you + provide a private key file you must also provide a public key file. HTTP @@ -122,10 +108,10 @@ USING PASSWORDS curl -u name:passwd http://machine.domain/full/path/to/file HTTP offers many different methods of authentication and curl supports - several: Basic, Digest, NTLM and Negotiate (SPNEGO). Without telling which - method to use, curl defaults to Basic. You can also ask curl to pick the - most secure ones out of the ones that the server accepts for the given URL, - by using --anyauth. + several: Basic, Digest, NTLM and Negotiate. Without telling which method to + use, curl defaults to Basic. You can also ask curl to pick the most secure + ones out of the ones that the server accepts for the given URL, by using + --anyauth. NOTE! According to the URL specification, HTTP URLs can not contain a user and password, so that style will not work when using curl via a proxy, even @@ -232,11 +218,6 @@ UPLOADING curl --proxytunnel -x proxy:port -T localfile ftp.upload.com -SMB / SMBS - - curl -T file.txt -u "domain\username:passwd" - smb://server.example.com/share/ - HTTP Upload all data on stdin to a specified HTTP site: diff --git a/docs/RELEASE-PROCEDURE b/docs/RELEASE-PROCEDURE index 2f85b3f..86fcef4 100644 --- a/docs/RELEASE-PROCEDURE +++ b/docs/RELEASE-PROCEDURE @@ -7,16 +7,15 @@ curl release procedure - how to do a release ============================================ -in the source code repo ------------------------ +[in the source code repo] -- edit `RELEASE-NOTES` to be accurate +- edit RELEASE-NOTES to be accurate -- update `docs/THANKS` +- update docs/THANKS - make sure all relevant changes are committed on the master branch -- tag the git repo in this style: `git tag -a curl-7_34_0`. -a annotates the +- tag the git repo in this style: 'git tag -a curl-7_34_0'. -a annotates the tag and we use underscores instead of dots in the version number. - run "./maketgz 7.34.0" to build the release tarballs. It is important that @@ -30,14 +29,11 @@ in the source code repo - upload the 8 resulting files to the primary download directory -in the curl-www repo --------------------- +[data in the curl-www repo] -- edit `Makefile` (version number and date), - -- edit `_newslog.html` (announce the new release) and - -- edit `_changes.html` (insert changes+bugfixes from RELEASE-NOTES) +- edit Makefile (version number and date), + _newslog.html (announce the new release) and + _changes.html (insert changes+bugfixes from RELEASE-NOTES) - commit all local changes @@ -47,48 +43,11 @@ in the curl-www repo (the web site then updates its contents automatically) -inform ------- +[inform] - send an email to curl-users, curl-announce and curl-library. Insert the RELEASE-NOTES into the mail. -celebrate ---------- +[celebrate] - suitable beverage intake is encouraged for the festivities - -curl release scheduling -======================= - -Basics ------- - -We do releases every 8 weeks on Wednesdays. If critical problems arise, we can -insert releases outside of the schedule or we can move the release date - but -this is very rare. - -Each 8 week release cycle is split in two 4-week periods. - -- During the first 4 weeks after a release, we allow new features and changes - to curl and libcurl. If we accept any such changes, we bump the minor number - used for the next release. - -- During the second 4-week period we do not merge any features or changes, we - then only focus on fixing bugs and polishing things to make a solid coming - release. - -Coming dates ------------- - -Based on the description above, here are some planned release dates (at the -time of this writing): - -- November 5, 2014 (version 7.39.0) -- December 31, 2014 -- February 25, 2015 -- April 22, 2015 -- June 17, 2015 -- August 12, 2015 -- October 7, 2015 -- December 2, 2015 diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index 01fe085..3c565e7 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -1,12 +1,12 @@ 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. New stuff - libcurl -------------------- +=================== 1. http2 test suite @@ -18,33 +18,37 @@ New stuff - libcurl 5. HTTPS to proxy -6. make sure there's an easy handle passed in to `curl_formadd()`, - `curl_formget()` and `curl_formfree()` by adding replacement functions and +6. 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 -7. add support for third-party SASL libraries such as Cyrus SASL - may need to +7. HTTP Digest authentication via Windows SSPI + +8. GSSAPI authentication in the email protocols + +9. add support for third-party SASL libraries such as Cyrus SASL - may need to move existing native and SSPI based authentication into vsasl folder after reworking HTTP and SASL code -8. SASL authentication in LDAP +10. SASL authentication in LDAP -9. 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 +11. 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 -10. Allow the email protocols to return the capabilities before +12. Allow the email protocols to return the capabilities before authenticating. This will allow an application to decide on the best authentication mechanism -11. Allow Windows threading model to be replaced by Win32 pthreads port +13. Allow Windows threading model to be replaced by Win32 pthreads port -12. Implement a dynamic buffer size to allow SFTP to use much larger buffers +14. 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 @@ -54,7 +58,7 @@ New stuff - curl don't have to be constructed before calling curl Improve -------- +======= 1. build for windows (considered hard by many users) @@ -65,9 +69,8 @@ Improve features/options in the future too 4. docs (considered "bad" by users but how do we make it better?) - - - split up `curl_easy_setopt.3` - - split up curl.1 + A - split up curl_easy_setopt.3 + B - split up curl.1 5. authentication framework (consider merging HTTP and SASL authentication to give one API for protocols to call) @@ -77,7 +80,7 @@ Improve ago Remove ------- +====== 1. cmake support (nobody maintains it) diff --git a/docs/SECURITY b/docs/SECURITY index ee844d8..c850f27 100644 --- a/docs/SECURITY +++ b/docs/SECURITY @@ -4,24 +4,21 @@ | (__| |_| | _ <| |___ \___|\___/|_| \_\_____| -curl security for developers -============================ +CURL SECURITY FOR DEVELOPERS This document is intended to provide guidance to curl developers on how security vulnerabilities should be handled. -Publishing Information ----------------------- +PUBLISHING INFORMATION -All known and public curl or libcurl related vulnerabilities are listed on -[the curl web site security page](http://curl.haxx.se/docs/security.html). +All known and public curl or libcurl related vulnerabilities are listed at +http://curl.haxx.se/docs/security.html Security vulnerabilities should not be entered in the project's public bug tracker unless the necessary configuration is in place to limit access to the issue to only the reporter and the project's security team. -Vulnerability Handling ----------------------- +VULNERABILITY HANDLING The typical process for handling a new security vulnerability is as follows. @@ -34,7 +31,7 @@ any reference to the security nature of the commit if done prior to the public announcement. - The person discovering the issue, the reporter, reports the vulnerability - privately to `curl-security@haxx.se`. That's an email alias that reaches a + privately to curl-security@haxx.se. That's an email alias that reaches a handful of selected and trusted people. - Messages that do not relate to the reporting or managing of an undisclosed @@ -66,7 +63,7 @@ announcement. workarounds, when the release is out and make sure to credit all contributors properly. -- Request a CVE number from distros@openwall[1] when also informing and +- Request a CVE number from distros@openwall.org[1] 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. @@ -92,16 +89,3 @@ announcement. mentioned. [1] = http://oss-security.openwall.org/wiki/mailing-lists/distros - -CURL-SECURITY (at haxx dot se) ------------------------------- - -Who is on this list? There are a couple of criteria you must meet, and then we -might ask you to join the list or you can ask to join it. It really isn't very -formal. We basically only require that you have a long-term presence in the -curl project and you have shown an understanding for the project and its way -of working. You must've been around for a good while and you should have no -plans in vanishing in the near future. - -We do not make the list of partipants public mostly because it tends to vary -somewhat over time and a list somewhere will only risk getting outdated. diff --git a/docs/SSLCERTS b/docs/SSLCERTS index 89e5bb6..14a0391 100644 --- a/docs/SSLCERTS +++ b/docs/SSLCERTS @@ -1,46 +1,23 @@ -SSL Certificate Verification -============================ + Peer SSL Certificate Verification + ================================= -SSL is TLS ----------- - -SSL is the old name. It is called TLS these days. - - -Native SSL ----------- - -If libcurl was built with Schannel or Secure Transport support (the native SSL -libraries included in Windows and Mac OS X), then this does not apply to -you. Scroll down for details on how the OS-native engines handle SSL -certificates. If you're not sure, then run "curl -V" and read the results. If -the version string says "WinSSL" in it, then it was built with Schannel -support. - -It is about trust ------------------ - -This system is about trust. In your local CA cert bundle you have certs from -*trusted* Certificate Authorities that you then can use to verify that the -server certificates you see are valid. They're signed by one of the CAs you -trust. - -Which CAs do you trust? You can decide to trust the same set of companies your -operating system trusts, or the set one of the known browsers trust. That's -basically trust via someone else you trust. You should just be aware that -modern operating systems and browsers are setup to trust *hundreds* of -companies and recent years several such CAs have been found untrustworthy. - -Certificate Verification ------------------------- +(NOTE: If libcurl was built with Schannel or Secure Transport support, then +this does not apply to you. Scroll down for details on how the OS-native +engines handle SSL certificates. If you're not sure, then run "curl -V" and +read the results. If the version string says "WinSSL" in it, then it was built +with Schannel support.) libcurl performs peer SSL certificate verification by default. This is done by using CA cert bundle that the SSL library can use to make sure the peer's server certificate is valid. -If you communicate with HTTPS, FTPS or other TLS-using servers using -certificates that are signed by CAs present in the bundle, you can be sure -that the remote server really is the one it claims to be. +If you communicate with HTTPS or FTPS servers using certificates that are +signed by CAs present in the bundle, you can be sure that the remote server +really is the one it claims to be. + +Until 7.18.0, curl bundled a severely outdated ca bundle file that was +installed by default. These days, the curl archives include no ca certs at +all. You need to get them elsewhere. See below for example. If the remote server uses a self-signed certificate, if you don't install a CA cert bundle, if the server uses a certificate signed by a CA that isn't @@ -49,13 +26,13 @@ impersonating your favorite site, and you want to transfer files from this server, do one of the following: 1. Tell libcurl to *not* verify the peer. With libcurl you disable this with - `curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);` + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE); With the curl command line tool, you disable this with -k/--insecure. 2. Get a CA certificate that can verify the remote server and use the proper option to point out this CA cert for verification when connecting. For - libcurl hackers: `curl_easy_setopt(curl, CURLOPT_CAPATH, capath);` + libcurl hackers: curl_easy_setopt(curl, CURLOPT_CAPATH, capath); With the curl command line tool: --cacert [file] @@ -69,32 +46,32 @@ server, do one of the following: If you use Internet Explorer, this is one way to get extract the CA cert for a particular server: - - View the certificate by double-clicking the padlock - - Find out where the CA certificate is kept (Certificate> + o View the certificate by double-clicking the padlock + o Find out where the CA certificate is kept (Certificate> Authority Information Access>URL) - - Get a copy of the crt file using curl - - Convert it from crt to PEM using the openssl tool: + o Get a copy of the crt file using curl + o Convert it from crt to PEM using the openssl tool: openssl x509 -inform DES -in yourdownloaded.crt \ -out outcert.pem -text - - Append the 'outcert.pem' to the CA cert bundle or use it stand-alone + o Append the 'outcert.pem' to the CA cert bundle or use it stand-alone as described below. If you use the 'openssl' tool, this is one way to get extract the CA cert for a particular server: - - `openssl s_client -connect xxxxx.com:443 |tee logfile` - - type "QUIT", followed by the "ENTER" key - - The certificate will have "BEGIN CERTIFICATE" and "END CERTIFICATE" + o openssl s_client -connect xxxxx.com:443 |tee logfile + o type "QUIT", followed by the "ENTER" key + o The certificate will have "BEGIN CERTIFICATE" and "END CERTIFICATE" markers. - - If you want to see the data in the certificate, you can do: "openssl + o If you want to see the data in the certificate, you can do: "openssl x509 -inform PEM -in certfile -text -out certdata" where certfile is the cert you extracted from logfile. Look in certdata. - - If you want to trust the certificate, you can append it to your - cert bundle or use it stand-alone as described. Just remember that the + o If you want to trust the certificate, you can append it to your + cert_bundle or use it stand-alone as described. Just remember that the security is no better than the way you obtained the certificate. 4. If you're using the curl command line tool, you can specify your own CA - cert path by setting the environment variable `CURL_CA_BUNDLE` to the path + cert path by setting the environment variable CURL_CA_BUNDLE to the path of your choice. If you're using the curl command line tool on Windows, curl will search @@ -109,7 +86,9 @@ server, do one of the following: 5. Get a better/different/newer CA cert bundle! One option is to extract the one a recent Firefox browser uses by running 'make ca-bundle' in the curl build tree root, or possibly download a version that was generated this - way for you: [CA Extract](http://curl.haxx.se/docs/caextract.html) + way for you: + + http://curl.haxx.se/docs/caextract.html Neglecting to use one of the above methods when dealing with a server using a certificate that isn't signed by one of the certificates in the installed CA @@ -117,29 +96,35 @@ cert bundle, will cause SSL to report an error ("certificate verify failed") during the handshake and SSL will then refuse further communication with that server. -Certificate Verification with NSS ---------------------------------- + Peer SSL Certificate Verification with NSS + ========================================== If libcurl was built with NSS support, then depending on the OS distribution, -it is probably required to take some additional steps to use the system-wide -CA cert db. RedHat ships with an additional module, libnsspem.so, which -enables NSS to read the OpenSSL PEM CA bundle. This library is missing in -OpenSuSE, and without it, NSS can only work with its own internal formats. NSS -also has a new [database format](https://wiki.mozilla.org/NSS_Shared_DB). - -Starting with version 7.19.7, libcurl automatically adds the 'sql:' prefix to -the certdb directory (either the hardcoded default /etc/pki/nssdb or the -directory configured with SSL_DIR environment variable). To check which certdb -format your distribution provides, examine the default certdb location: -/etc/pki/nssdb; the new certdb format can be identified by the filenames -cert9.db, key4.db, pkcs11.txt; filenames of older versions are cert8.db, -key3.db, secmod.db. - -Certificate Verification with Schannel and Secure Transport ------------------------------------------------------------ - -If libcurl was built with Schannel (Microsoft's native TLS engine) or Secure -Transport (Apple's native TLS engine) support, then libcurl will still perform +it is probably required to take some additional steps to use the system-wide CA +cert db. RedHat ships with an additional module, libnsspem.so, which enables +NSS to read the OpenSSL PEM CA bundle. This library is missing in OpenSuSE, and +without it, NSS can only work with its own internal formats. NSS also has a new +database format: https://wiki.mozilla.org/NSS_Shared_DB + +Starting with version 7.19.7, libcurl will check for the NSS version it runs, +and automatically add the 'sql:' prefix to the certdb directory (either the +hardcoded default /etc/pki/nssdb or the directory configured with SSL_DIR +environment variable) if version 3.12.0 or later is detected. To check which +certdb format your distribution provides, examine the default +certdb location: /etc/pki/nssdb; the new certdb format can be identified by +the filenames cert9.db, key4.db, pkcs11.txt; filenames of older versions are +cert8.db, key3.db, modsec.db. + +Usually these cert databases are empty, but NSS also has built-in CAs which are +provided through a shared library, libnssckbi.so; if you want to use these +built-in CAs, then create a symlink to libnssckbi.so in /etc/pki/nssdb: +ln -s /usr/lib[64]/libnssckbi.so /etc/pki/nssdb/libnssckbi.so + + Peer SSL Certificate Verification with Schannel and Secure Transport + ==================================================================== + +If libcurl was built with Schannel (Microsoft's TLS/SSL engine) or Secure +Transport (Apple's TLS/SSL engine) support, then libcurl will still perform peer certificate verification, but instead of using a CA cert bundle, it will use the certificates that are built into the OS. These are the same certificates that appear in the Internet Options control panel (under Windows) diff --git a/docs/THANKS b/docs/THANKS index 32aee19..3642add 100644 --- a/docs/THANKS +++ b/docs/THANKS @@ -22,7 +22,7 @@ Alan Pinstein Albert Chin-A-Young Albert Choy Ale Vesely -Alejandro Alvarez Ayllon +Alejandro Alvarez Aleksandar Milivojevic Aleksey Tulinov Alessandro Ghedini @@ -48,7 +48,6 @@ Alexey Zakhlestin Alexis Carvalho Alfred Gebert Allen Pulsifer -Alona Rossen Amol Pattekar Amr Shahin Anatoli Tubman @@ -56,7 +55,6 @@ Anders Gustafsson Anders Havn Andi Jahja Andre Guibert de Bruet -Andre Heinecke Andreas Damm Andreas Faerber Andreas Farber @@ -68,8 +66,8 @@ Andreas Schuldei Andreas Wurf Andrei Benea Andrei Cipu -Andrei Kurushin Andrej E Baranov +Andres Garcia Andrew Benham Andrew Biggs Andrew Bushnell @@ -79,14 +77,12 @@ Andrew Kurushin Andrew Moise Andrew Wansink Andrew de los Reyes -Andrey Labunets Andrii Moiseiev Andrés García Andy Cedilnik Andy Serpa Andy Tsouladze Angus Mackay -Anthon Pang Anthony Bryan Anthony G. Basile Antoine Calando @@ -101,14 +97,11 @@ Arnaud Ebalard Arthur Murray Arve Knudsen Arvid Norberg -Ask Bjørn Hansen -Askar Safin Ates Goral Augustus Saunders Avery Fay Axel Tillequin Balaji Parasuram -Balaji Salunke Balint Szilakszi Barry Abrahamson Bart Whiteley @@ -123,7 +116,6 @@ Benbuck Nason Benjamin Gerard Benjamin Gilbert Benjamin Johnson -Benoit Neil Benoit Sigoure Bernard Leak Bernhard Reutner-Fischer @@ -132,7 +124,6 @@ Bill Doyle Bill Egert Bill Hoffman Bill Middlecamp -Bill Nagel Bjoern Sikora Bjorn Augustsson Bjorn Reese @@ -143,12 +134,10 @@ Bob Richmond Bob Schader Bogdan Nicula Brad Burdick -Brad Harder Brad Hards Brad King Brad Spencer Bradford Bruce -Brandon Casey Brandon Wang Brendan Jurd Brent Beardsley @@ -159,7 +148,6 @@ Brian R Duffy Brian Ulm Brock Noland Bruce Mitchener -Bruno Thomsen Bruno de Carvalho Bryan Henderson Bryan Kemp @@ -167,10 +155,9 @@ Byrial Jensen Cameron Kaiser Camille Moncelier Caolan McNamara -Carlo Wood Carsten Lange Casey O'Donnell -Catalin Patulea +Cedric Deltheil Chad Monroe Chandrakant Bagul Charles Kerr @@ -179,13 +166,13 @@ Chih-Chung Chang Chris "Bob Bob" Chris Combes Chris Conlon +Chris Conroy Chris Deidun Chris Flerackers Chris Gaukroger Chris Maltby Chris Mumford Chris Smowton -Chris Young Christian Grothoff Christian Hägele Christian Krause @@ -208,7 +195,6 @@ Clifford Wolf Cody Jones Cody Mack Colby Ranger -Colin Blair Colin Hogben Colin Watson Colm Buckley @@ -268,7 +254,6 @@ David Kimdon David Lang David LeBlanc David McCreedy -David Meyer David Odin David Phillips David Rosenstrauch @@ -282,7 +267,6 @@ David Woodhouse David Wright David Yan Dengminwen -Dennis Clarke Derek Higgins Detlef Schmier Didier Brisebourg @@ -290,9 +274,7 @@ Diego Casorran Dilyan Palauzov Dima Barsky Dima Tisnek -Dimitar Boevski Dimitre Dimitrov -Dimitrios Siganos Dimitris Sarris Dinar Dirk Eddelbuettel @@ -300,7 +282,6 @@ Dirk Manske Dmitri Shubin Dmitriy Sergeyev Dmitry Bartsevich -Dmitry Falko Dmitry Kurochkin Dmitry Popov Dmitry Rechkin @@ -316,13 +297,13 @@ Douglas R. Horner Douglas Steinwand Dov Murik Duane Cathey +Duncan Duncan Mac-Vicar Prett Dustin Boswell Dylan Ellicott Dylan Salisbury Early Ehlinger Ebenezer Ikonne -Ed Morley Edin Kadribasic Eduard Bloch Edward Rudd @@ -352,10 +333,8 @@ Eric Wong Eric Young Erick Nuwendam Erik Johansson -Ernest Beinrohr Erwan Legrand Erwin Authried -Ethan Glasser Camp Eugene Kotlyarov Evan Jordan Evgeny Turnaev @@ -369,9 +348,8 @@ Felix Yan Felix von Leitner Feng Tu Florian Schoppmann -Florian Weimer Forrest Cahoon -Frank Gevaerts +Francois Charlier Frank Hempel Frank Keeney Frank McGeough @@ -379,7 +357,6 @@ Frank Meier Frank Ticheler Frank Van Uffelen FrantiÅ¡ek Kučera -François Charlier Fred Machado Fred New Fred Noz @@ -413,27 +390,24 @@ Gilles Blanc Gisle Vanem Giuseppe Attardi Giuseppe D'Ambrosio -Glen A Johnson Jr. Glen Nakamura Glen Scott Glenn Sheridan +Gokhan Sengun Gordon Marler Gorilla Maguila Grant Erickson Greg Hewgill Greg Morse Greg Onufer -Greg Pratt Greg Zavertnik Grigory Entin Guenole Bescon Guenter Knauf Guido Berhoerster Guillaume Arluison -Gunter Knauf Gustaf Hui Gwenole Beauchesne -Gökhan Şengün Götz Babin-Ebell Hamish Mackenzie Hang Kin Lau @@ -442,14 +416,12 @@ Hanno Kranzhoff Hans Steegers Hans-Jurgen May Hardeep Singh -Haris Okanovic Harshal Pradhan Hauke Duden He Qin Heikki Korpela Heinrich Ko Heinrich Schaefer -Helwing Lutz Hendrik Visage Henrik Storner Henry Ludemann @@ -485,7 +457,6 @@ Jacky Lam Jacob Meuser Jacob Moshenko Jad Chamcham -Jakub Zakrzewski James Bursa James Cheng James Clancy @@ -505,7 +476,6 @@ Jan Schaumann Jan Van Boghout Jared Jennings Jared Lundell -Jari Aalto Jari Sundell Jason Glasgow Jason Liu @@ -520,7 +490,7 @@ Jean-Claude Chauve Jean-Francois Bertrand Jean-Louis Lemaire Jean-Marc Ranger -Jean-Noël Rouvignac +Jean-Noel Rouvignac Jean-Philippe Barrette-LaPierre Jeff Connelly Jeff Hodges @@ -530,12 +500,11 @@ Jeff Lawson Jeff Phillips Jeff Pohlmeyer Jeff Weber +Jeffrey Pohlmeyer Jeremy Friesner Jeremy Huddleston -Jeremy Lin Jeroen Koekkoek Jerome Muffat-Meridol -Jerome Robert Jerome Vouillon Jerry Krinock Jerry Wu @@ -557,13 +526,10 @@ Joe Mason Joel Chen Jofell Gallardo Johan Anderson -Johan Lantz Johan Nilsson Johan van Selst Johannes Bauer -Johannes Ernst John Bradshaw -John Coffey John Crow John Dennis John Dunn @@ -584,19 +550,15 @@ Johnny Luong Jon Grubbs Jon Nelson Jon Sargeant -Jon Spencer Jon Torrey Jon Travis Jon Turner Jonas Forsman Jonas Schnelli Jonatan Lander -Jonatan Vela -Jonathan Cardoso Machado Jonathan Hseu Jonathan Nieder Jongki Suwandi -Jose Alf Jose Kahan Josef Wolf Josh Kapell @@ -611,7 +573,6 @@ Jukka Pihl Julian Noble Julian Taylor Julien Chaffraix -Julien Nabet Julien Royer Jun-ichiro itojun Hagino Jurij Smakov @@ -620,13 +581,13 @@ Justin Karneges Justin Maggard Jörg Mueller-Tolk Jörn Hartroth -K. R. Walker Kai Engert Kai Sommerfeld Kai-Uwe Rommel Kalle Vahlman Kamil Dudka Kang-Jin Lee +Karl M Karl Moerder Karol Pietrzak Kaspar Brand @@ -657,14 +618,12 @@ Krishnendu Majumdar Krister Johansen Kristian Gunstone Kristian Köhntopp -Kyle J. McKay Kyle L. Huff Kyle Sallee Lachlan O'Dea Larry Campbell Larry Fahnoe Larry Lin -Larry Stone Lars Buitinck Lars Gustafsson Lars J. Aas @@ -680,11 +639,9 @@ Len Krause Lenaic Lefever Lenny Rachitsky Leon Winter -Leonardo Rosati Liam Healy Lijo Antony Linas Vepstas -Lindley French Ling Thio Linus Nielsen Feltzing Lisa Xu @@ -692,18 +649,15 @@ Liza Alenchery Lluís Batlle i Rossell Loic Dachary Loren Kirkby -Luan Cestari Luca Altea +Luca Alteas Lucas Adamski -Lucas Pardue -Ludek Finstrle Ludovico Cavedon Lukasz Czekierda Luke Amery Luke Call Luke Dashjr Luong Dinh Dung -Lyndon Hill Maciej Karpiuk Maciej Puzio Maciej W. Rozycki @@ -715,10 +669,8 @@ Manuel Massing Marc Boucher Marc Deslauriers Marc Doughty -Marc Hesse Marc Hoersken Marc Kleine-Budde -Marc Renault Marcel Raad Marcel Roelofs Marcelo Juchem @@ -761,7 +713,6 @@ Mateusz Loskot Mathias Axelsson Mats Lidell Matt Arsenault -Matt Ford Matt Kraai Matt Veenstra Matt Witherspoon @@ -796,12 +747,11 @@ Michael Smith Michael Stillwell Michael Wallner Michal Bonino +Michal Gorny +Michal Kowalczyk Michal Marek -Michał Górny -Michał Kowalczyk Michele Bini Miguel Angel -Miguel Diaz Mihai Ionescu Mikael Johansson Mikael Sennerholm @@ -810,21 +760,19 @@ Mike Crowe Mike Dobbs Mike Giancola Mike Hasselberg -Mike Henshaw Mike Hommey Mike Mio Mike Power Mike Protts Mike Revi Miklos Nemeth -Miroslav Spousta Mitz Wark Mohamed Lrhazi Mohammad AlSaleh Mohun Biswas +Moonesamy Myk Taylor Nach M. S. -Nagai H Nathan Coulter Nathan O'Sullivan Nathanael Nerode @@ -851,17 +799,15 @@ Nikos Mavrogiannopoulos Ning Dong Nir Soffer Nis Jorgensen -Nobuhiro Ban Nodak Sodak Norbert Frese Norbert Novotny Ofer -Ola Mork Olaf Flebbe +Olaf Stueben Olaf Stüben Oliver Gondža Oliver Kuckertz -Oliver Schindler Olivier Berger Oren Tirosh Ori Avtalion @@ -872,12 +818,10 @@ Paolo Piacentini Paras Sethia Pascal Terjan Pasha Kuznetsov -Pasi Karkkainen Pat Ray Patrice Guerin Patricia Muscalu Patrick Bihan-Faou -Patrick McManus Patrick Monnerat Patrick Scott Patrick Smith @@ -892,7 +836,6 @@ Paul Marquis Paul Moore Paul Nolan Paul Querna -Paul Saab Pavel Cenek Pavel Orehov Pavel Raiskup @@ -900,6 +843,7 @@ Pawel A. Gajda Pawel Kierski Pedro Larroy Pedro Neves +Pete Su Peter Bray Peter Forret Peter Gal @@ -914,8 +858,6 @@ Peter Su Peter Sylvester Peter Todd Peter Verhas -Peter Wang -Peter Wu Peter Wullinger Peteris Krumins Petr Bahula @@ -947,7 +889,6 @@ Quinn Slack Radu Simionescu Rafa Muyo Rafael Sagula -Rafaël Carré Rainer Canavan Rainer Jung Rainer Koenig @@ -960,7 +901,6 @@ Randy McMurchy Ravi Pratap Ray Dassen Ray Pekowski -Ray Satiro Reinout van Schouwen Remi Gacogne Renato Botelho @@ -981,7 +921,6 @@ Richard Clayton Richard Cooper Richard Gorton Richard Michael -Richard Moore Richard Prescott Richard Silverman Rick Jones @@ -1005,7 +944,6 @@ Robin Johnson Robin Kay Robson Braga Araujo Rodney Simmons -Rodric Glaser Rodrigo Silva Roland Blom Roland Krikava @@ -1014,7 +952,6 @@ Rolland Dudemaine Roman Koifman Roman Mamedov Romulo A. Ceccon -Ron Parker Ron Zapp Rosimildo da Silva Roy Shan @@ -1030,7 +967,7 @@ S. Moonesamy Salvador Dávila Salvatore Sorrentino Sam Deane -Sam Hurst +Sam Listopad Sampo Kellomaki Samuel Díaz García Samuel Listopad @@ -1041,7 +978,6 @@ Santhana Todatry Saqib Ali Sara Golemon Saran Neti -Sascha Swiercy Saul good Scott Bailey Scott Barrett @@ -1049,6 +985,7 @@ Scott Cantor Scott Davis Scott McCreary Sebastian Rasmussen +Sebastien Willemijns Senthil Raja Velu Sergei Nikulov Sergey Tatarincev @@ -1071,18 +1008,15 @@ Song Ma Sonia Subramanian Spacen Jasset Spiridonoff A.V -Spork Schivago Stadler Stephan Stan van de Burgt Stanislav Ivochkin -Stefan Bühler Stefan Esser Stefan Krause Stefan Neis Stefan Teleman Stefan Tomanek Stefan Ulrich -Steinar H. Gunderson Stephan Bergmann Stephen Collyer Stephen Kick @@ -1102,15 +1036,12 @@ Steven Gu Steven M. Schweda Steven Parkes Stoned Elipot -Sune Ahlgren Sven Anders Sven Neuhaus Sven Wegener -Symeon Paraschoudis Sébastien Willemijns T. Bharath T. Yamada -Tae Hyoung Ahn Taneli Vahakangas Tanguy Fautre Tatsuhiro Tsujikawa @@ -1132,9 +1063,7 @@ Tim Costello Tim Harder Tim Heckman Tim Newsome -Tim Ruehsen Tim Sneddon -Tim Starling Timo Sirainen Tinus van den Berg Tobias Markus @@ -1159,7 +1088,6 @@ Tomas Hoger Tomas Mlcoch Tomas Pospisek Tomas Szepe -Tomasz Kojm Tomasz Lacki Tommie Gannert Tommy Tam @@ -1179,7 +1107,6 @@ Török Edwin Ulf Härnhammar Ulf Samuelsson Ulrich Doehner -Ulrich Telle Ulrich Zadow Venkat Akella Victor Snezhko @@ -1199,10 +1126,8 @@ Vladimir Lazarenko Vojtech Janota Vojtech Minarik Vsevolod Novikov -Waldek Kozba Walter J. Mack Ward Willats -Warren Menzer Wayne Haigh Werner Koch Wesley Laxton @@ -1211,20 +1136,18 @@ Wez Furlong Wilfredo Sanchez Will Dietz Willem Sparreboom -William Ahern Wojciech Zwiefka Wouter Van Rooy Wu Yongzheng Xavier Bouchoux Yaakov Selkowitz +Yamada Yasuharu Yang Tse Yarram Sunil -Yasuharu Yamada Yehezkel Horowitz Yehoshua Hershberg Yi Huang Yingwei Liu -Yousuke Kimoto Yukihiro Kawada Yuriy Sosov Yves Arrouye @@ -1236,4 +1159,3 @@ Zvi Har'El nk swalkaus at yahoo.com tommink[at]post.pl -Никита Дорохин diff --git a/docs/THANKS-filter b/docs/THANKS-filter deleted file mode 100644 index 5237963..0000000 --- a/docs/THANKS-filter +++ /dev/null @@ -1,48 +0,0 @@ -# This is a list of names we have recorded that already are thanked -# appropriately in THANKS. This list contains variations of their names and -# their "canonical" name. This file is used for scripting purposes to avoid -# duplicate entries and will not be included in release tarballs. -# When removing dupes that aren't identical names from THANKS, add a line -# here! -# -# Used-by: contributor.sh -s/Andres Garcia/Andrés García/ -s/Chris Conroy/Christopher Conroy/ -s/Francois Charlier/François Charlier/ -s/Gokhan Sengun/Gökhan Şengün/ -s/John Malmberg/John E. Malmberg/ -s/Luca Alteas/Luca Altea/ -s/Michal Gorny/Michał Górny/ -s/Michal Górny/Michał Górny/ -s/Moonesamy/S. Moonesamy/ -s/Pete Su$/Peter Su/ -s/Sam Listopad/Samuel Listopad/ -s/Sebastien Willemijns/Sébastien Willemijns/ -s/YAMADA Yasuharu/Yasuharu Yamada/ -s/Karl M$/Karl Moerder/ -s/Bjorn Stenberg/Björn Stenberg/ -s/upstream tests 305 and 404// -s/Gaël PORTAY/Gaël Portay/ -s/Romulo Ceccon/Romulo A. Ceccon/ -s/Nach M. S$/Nach M. S./ -s/Jay Satiro/Ray Satiro/ -s/Richard J. Moore/Richard Moore/ -s/Sergey Nikulov/Sergei Nikulov/ -s/Petr Písař/Petr Pisar/ -s/Nick Zitzmann (originally)/Nick Zitzmann/ -s/product-security at Apple// -s/IT DOES NOT WORK// -s/Albert Chin/Albert Chin-A-Young/ -s/Paras S/Paras Sethia/ -s/Дмитрий Фалько/Dmitry Falko/ -s/byte_bucket in the #curl IRC channel// -s/Michal Górny and Anthony G. Basile// -s/Alejandro Alvarez$/Alejandro Alvarez Ayllon/ -s/Ant Bryan/Anthony Bryan/ -s/Cédric Deltheil/Cédric Deltheil/ -s/Christian Hagele/Christian Hägele/ -s/douglas steinwand/Douglas Steinwand/ -s/Frank Van Uffelen and Fabian Hiernaux// -s/Rodrigo Silva (MestreLion)/Rodrigo Silva/ -s/tetetest tetetest// -s/Jiří HruÅ¡ka/Jiri Hruska/ diff --git a/docs/TODO b/docs/TODO index 6217569..585c490 100644 --- a/docs/TODO +++ b/docs/TODO @@ -19,12 +19,10 @@ 1.6 Modified buffer size approach 1.7 Detect when called from within callbacks 1.8 Allow SSL (HTTPS) to proxy - 1.9 Cache negative name resolves 2. libcurl - multi interface 2.1 More non-blocking 2.2 Fix HTTP Pipelining for PUT - 2.3 Better support for same name resolves 3. Documentation 3.1 Update date and version in man pages @@ -35,8 +33,6 @@ 4.3 Earlier bad letter detection 4.4 REST for large files 4.5 ASCII support - 4.6 GSSAPI via Windows SSPI - 4.7 STAT for LIST without data connection 5. HTTP 5.1 Better persistency for HTTP 1.0 @@ -65,66 +61,60 @@ 10. LDAP 10.1 SASL based authentication mechanisms - 11. SMB - 11.1 File listing support - 11.2 Honor file timestamps - 11.3 Use NTLMv2 + 11. New protocols + 11.1 RSYNC + + 12. SSL + 12.1 Disable specific versions + 12.2 Provide mutex locking API + 12.3 Evaluate SSL patches + 12.4 Cache OpenSSL contexts + 12.5 Export session ids + 12.6 Provide callback for cert verification + 12.7 improve configure --with-ssl + 12.8 Support DANE + + 13. GnuTLS + 13.1 SSL engine stuff + 13.2 check connection + + 14. SASL + 14.1 Other authentication mechanisms - 12. New protocols - 12.1 RSYNC - - 13. SSL - 13.1 Disable specific versions - 13.2 Provide mutex locking API - 13.3 Evaluate SSL patches - 13.4 Cache OpenSSL contexts - 13.5 Export session ids - 13.6 Provide callback for cert verification - 13.7 improve configure --with-ssl - 13.8 Support DANE - - 14. GnuTLS - 14.1 SSL engine stuff - 14.2 check connection - - 15. SASL - 15.1 Other authentication mechanisms - 15.2 Add QOP support to GSSAPI authentication - - 16. Client - 16.1 sync - 16.2 glob posts - 16.3 prevent file overwriting - 16.4 simultaneous parallel transfers - 16.5 provide formpost headers - 16.6 warning when setting an option - - 17. Build - 17.1 roffit - - 18. Test suite - 18.1 SSL tunnel - 18.2 nicer lacking perl message - 18.3 more protocols supported - 18.4 more platforms supported - 18.5 Add support for concurrent connections - - 19. Next SONAME bump - 19.1 http-style HEAD output for FTP - 19.2 combine error codes - 19.3 extend CURLOPT_SOCKOPTFUNCTION prototype - - 20. Next major release - 20.1 cleanup return codes - 20.2 remove obsolete defines - 20.3 size_t - 20.4 remove several functions - 20.5 remove CURLOPT_FAILONERROR - 20.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE - 20.7 remove progress meter from libcurl - 20.8 remove 'curl_httppost' from public - 20.9 have form functions use CURL handle argument - 20.10 Add CURLOPT_MAIL_CLIENT option + 15. Client + 15.1 sync + 15.2 glob posts + 15.3 prevent file overwriting + 15.4 simultaneous parallel transfers + 15.5 provide formpost headers + 15.6 warning when setting an option + + 16. Build + 16.1 roffit + + 17. Test suite + 17.1 SSL tunnel + 17.2 nicer lacking perl message + 17.3 more protocols supported + 17.4 more platforms supported + 17.5 Add support for concurrent connections + + 18. Next SONAME bump + 18.1 http-style HEAD output for FTP + 18.2 combine error codes + 18.3 extend CURLOPT_SOCKOPTFUNCTION prototype + + 19. Next major release + 19.1 cleanup return codes + 19.2 remove obsolete defines + 19.3 size_t + 19.4 remove several functions + 19.5 remove CURLOPT_FAILONERROR + 19.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE + 19.7 remove progress meter from libcurl + 19.8 remove 'curl_httppost' from public + 19.9 have form functions use CURL handle argument + 19.10 Add CURLOPT_MAIL_CLIENT option ============================================================================== @@ -140,7 +130,7 @@ Use 'struct lifreq' and SIOCGLIFADDR instead of 'struct ifreq' and SIOCGIFADDR on newer Solaris versions as they claim the latter is obsolete. - To support IPv6 interface addresses for network interfaces properly. + To support ipv6 interface addresses for network interfaces properly. 1.4 signal-based resolver timeouts @@ -199,12 +189,6 @@ ...and by Firefox soon: https://bugzilla.mozilla.org/show_bug.cgi?id=378637 -1.9 Cache negative name resolves - - 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. - - 2. libcurl - multi interface 2.1 More non-blocking @@ -227,15 +211,6 @@ serial requests and currently libcurl only supports that for HEAD and GET requests but it should also be possible for PUT. -2.3 Better support for same name resolves - - If a name resolve has been initiated for name NN and a second easy handle - wants to resolve that name as well, make it wait for the first resolve to end - up in the cache instead of doing a second separate resolve. This is - especially needed when adding many simultaneous handles using the same host - name when the DNS resolver can get flooded. - - 3. Documentation 3.1 Update date and version in man pages @@ -276,20 +251,6 @@ FTP ASCII transfers do not follow RFC959. They don't convert the data accordingly. -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. - -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 - -This is not detailed in any FTP specification. - 5. HTTP 5.1 Better persistency for HTTP 1.0 @@ -398,47 +359,32 @@ to provide the data to send. be possible to use ldap_bind_s() instead specifying the security context information ourselves. -11. SMB - -11.1 File listing support - -Add support for listing the contents of a SMB share. The output should probably -be the same as/similar to FTP. - -11.2 Honor file timestamps - -The timestamp of the transfered file should reflect that of the original file. +11. New protocols -11.3 Use NTLMv2 - -Currently the SMB authentication uses NTLMv1. - -12. New protocols - -12.1 RSYNC +11.1 RSYNC There's no RFC for the protocol or an URI/URL format. An implementation should most probably use an existing rsync library, such as librsync. -13. SSL +12. SSL -13.1 Disable specific versions +12.1 Disable specific versions Provide an option that allows for disabling specific SSL versions, such as SSLv2 http://curl.haxx.se/bug/feature.cgi?id=1767276 -13.2 Provide mutex locking API +12.2 Provide mutex locking API Provide a libcurl API for setting mutex callbacks in the underlying SSL library, so that the same application code can use mutex-locking independently of OpenSSL or GnutTLS being used. -13.3 Evaluate SSL patches +12.3 Evaluate SSL patches Evaluate/apply Gertjan van Wingerde's SSL patches: http://curl.haxx.se/mail/lib-2004-03/0087.html -13.4 Cache OpenSSL contexts +12.4 Cache OpenSSL contexts "Look at SSL cafile - quick traces look to me like these are done on every request as well, when they should only be necessary once per SSL context (or @@ -448,7 +394,7 @@ Currently the SMB authentication uses NTLMv1. style connections are re-used. It will make us use slightly more memory but it will libcurl do less creations and deletions of SSL contexts. -13.5 Export session ids +12.5 Export session ids Add an interface to libcurl that enables "session IDs" to get exported/imported. Cris Bailiff said: "OpenSSL has functions which can @@ -456,18 +402,18 @@ Currently the SMB authentication uses NTLMv1. the state from such a buffer at a later date - this is used by mod_ssl for apache to implement and SSL session ID cache". -13.6 Provide callback for cert verification +12.6 Provide callback for cert verification OpenSSL supports a callback for customised verification of the peer certificate, but this doesn't seem to be exposed in the libcurl APIs. Could it be? There's so much that could be done if it were! -13.7 improve configure --with-ssl +12.7 improve configure --with-ssl make the configure --with-ssl option first check for OpenSSL, then GnuTLS, then NSS... -13.8 Support DANE +12.8 Support DANE DNS-Based Authentication of Named Entities (DANE) is a way to provide SSL keys and certs over DNS using DNSSEC as an alternative to the CA model. @@ -479,34 +425,26 @@ Currently the SMB authentication uses NTLMv1. http://curl.haxx.se/mail/lib-2013-03/0103.html . libunbound may be the correct library to base this development on. -14. GnuTLS +13. GnuTLS -14.1 SSL engine stuff +13.1 SSL engine stuff Is this even possible? -14.2 check connection +13.2 check connection Add a way to check if the connection seems to be alive, to correspond to the SSL_peak() way we use with OpenSSL. -15. SASL +14. SASL -15.1 Other authentication mechanisms - - Add support for other authentication mechanisms such as EXTERNAL, OLP, - GSS-SPNEGO and others. - -15.2 Add QOP support to GSSAPI authentication +14.1 Other authentication mechanisms - Currently the GSSAPI authentication only supports the default QOP of auth - (Authentication), whilst Kerberos V5 supports both auth-int (Authentication - with integrity protection) and auth-conf (Authentication with integrity and - privacy protection). + Add support for GSSAPI to SMTP, POP3 and IMAP. -16. Client +15. Client -16.1 sync +15.1 sync "curl --sync http://example.com/feed[1-100].rss" or "curl --sync http://example.net/{index,calendar,history}.html" @@ -515,12 +453,12 @@ Currently the SMB authentication uses NTLMv1. remote file is newer than the local file. A Last-Modified HTTP date header should also be used to set the mod date on the downloaded file. -16.2 glob posts +15.2 glob posts Globbing support for -d and -F, as in 'curl -d "name=foo[0-9]" URL'. This is easily scripted though. -16.3 prevent file overwriting +15.3 prevent file overwriting Add an option that prevents cURL from overwriting existing local files. When used, and there already is an existing file with the target file name @@ -528,14 +466,14 @@ Currently the SMB authentication uses NTLMv1. existing). So that index.html becomes first index.html.1 and then index.html.2 etc. -16.4 simultaneous parallel transfers +15.4 simultaneous parallel transfers The client could be told to use maximum N simultaneous parallel transfers and then just make sure that happens. It should of course not make more than one connection to the same remote host. This would require the client to use the multi interface. http://curl.haxx.se/bug/feature.cgi?id=1558595 -16.5 provide formpost headers +15.5 provide formpost headers Extending the capabilities of the multipart formposting. How about leaving the ';type=foo' syntax as it is and adding an extra tag (headers) which @@ -549,43 +487,43 @@ Currently the SMB authentication uses NTLMv1. which should overwrite the program reasonable defaults (plain/text, 8bit...) -16.6 warning when setting an option +15.6 warning when setting an option Display a warning when libcurl returns an error when setting an option. This can be useful to tell when support for a particular feature hasn't been compiled into the library. -17. Build +16. Build -17.1 roffit +16.1 roffit Consider extending 'roffit' to produce decent ASCII output, and use that instead of (g)nroff when building src/tool_hugehelp.c -18. Test suite +17. Test suite -18.1 SSL tunnel +17.1 SSL tunnel Make our own version of stunnel for simple port forwarding to enable HTTPS and FTP-SSL tests without the stunnel dependency, and it could allow us to provide test tools built with either OpenSSL or GnuTLS -18.2 nicer lacking perl message +17.2 nicer lacking perl message If perl wasn't found by the configure script, don't attempt to run the tests but explain something nice why it doesn't. -18.3 more protocols supported +17.3 more protocols supported Extend the test suite to include more protocols. The telnet could just do FTP or http operations (for which we have test servers). -18.4 more platforms supported +17.4 more platforms supported Make the test suite work on more platforms. OpenBSD and Mac OS. Remove fork()s and it should become even more portable. -18.5 Add support for concurrent connections +17.5 Add support for concurrent connections Tests 836, 882 and 938 were designed to verify that separate connections aren't used when using different login credentials in protocols that shouldn't re-use @@ -599,14 +537,14 @@ Currently the SMB authentication uses NTLMv1. and thus the wait for connections loop is never entered to receive the second connection. -19. Next SONAME bump +18. Next SONAME bump -19.1 http-style HEAD output for FTP +18.1 http-style HEAD output for FTP #undef CURL_FTP_HTTPSTYLE_HEAD in lib/ftp.c to remove the HTTP-style headers from being output in NOBODY requests over FTP -19.2 combine error codes +18.2 combine error codes Combine some of the error codes to remove duplicates. The original numbering should not be changed, and the old identifiers would be @@ -631,29 +569,29 @@ Currently the SMB authentication uses NTLMv1. CURLE_TFTP_PERM => CURLE_REMOTE_ACCESS_DENIED -19.3 extend CURLOPT_SOCKOPTFUNCTION prototype +18.3 extend CURLOPT_SOCKOPTFUNCTION prototype The current prototype only provides 'purpose' that tells what the connection/socket is for, but not any protocol or similar. It makes it hard for applications to differentiate on TCP vs UDP and even HTTP vs FTP and similar. -20. Next major release +19. Next major release -20.1 cleanup return codes +19.1 cleanup return codes curl_easy_cleanup() returns void, but curl_multi_cleanup() returns a CURLMcode. These should be changed to be the same. -20.2 remove obsolete defines +19.2 remove obsolete defines remove obsolete defines from curl/curl.h -20.3 size_t +19.3 size_t make several functions use size_t instead of int in their APIs -20.4 remove several functions +19.4 remove several functions remove the following functions from the public API: @@ -674,18 +612,18 @@ Currently the SMB authentication uses NTLMv1. curl_multi_socket_all -20.5 remove CURLOPT_FAILONERROR +19.5 remove CURLOPT_FAILONERROR Remove support for CURLOPT_FAILONERROR, it has gotten too kludgy and weird internally. Let the app judge success or not for itself. -20.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE +19.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE Remove support for a global DNS cache. Anything global is silly, and we already offer the share interface for the same functionality but done "right". -20.7 remove progress meter from libcurl +19.7 remove progress meter from libcurl The internally provided progress meter output doesn't belong in the library. Basically no application wants it (apart from curl) but instead applications @@ -695,7 +633,7 @@ Currently the SMB authentication uses NTLMv1. variable types passed to it instead of doubles so that big files work correctly. -20.8 remove 'curl_httppost' from public +19.8 remove 'curl_httppost' from public curl_formadd() was made to fill in a public struct, but the fact that the struct is public is never really used by application for their own advantage @@ -704,7 +642,7 @@ Currently the SMB authentication uses NTLMv1. Changing them to return a private handle will benefit the implementation and allow us much greater freedoms while still maintaining a solid API and ABI. -20.9 have form functions use CURL handle argument +19.9 have form functions use CURL handle argument 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 @@ -712,7 +650,7 @@ Currently the SMB authentication uses NTLMv1. curl_easy_perform() (or similar) called - which is hard to grasp and a design mistake. -20.10 Add CURLOPT_MAIL_CLIENT option +19.10 Add CURLOPT_MAIL_CLIENT option Rather than use the URL to specify the mail client string to present in the HELO and EHLO commands, libcurl should support a new CURLOPT specifically for diff --git a/docs/TheArtOfHttpScripting b/docs/TheArtOfHttpScripting index 0ba9f65..7235f12 100644 --- a/docs/TheArtOfHttpScripting +++ b/docs/TheArtOfHttpScripting @@ -1,3 +1,4 @@ +Updated: Dec 24, 2013 (http://curl.haxx.se/docs/httpscripting.html) _ _ ____ _ ___| | | | _ \| | / __| | | | |_) | | @@ -556,10 +557,8 @@ The Art Of Scripting HTTP Requests Using Curl truckload of advanced features to allow all those encryptions and key infrastructure mechanisms encrypted HTTP requires. - Curl supports encrypted fetches when built to use a TLS library and it can be - built to use one out of a fairly large set of libraries - "curl -V" will show - which one your curl was built to use (if any!). To get a page from a HTTPS - server, simply run curl like: + Curl supports encrypted fetches thanks to the freely available OpenSSL + libraries. To get a page from a HTTPS server, simply run curl like: curl https://secure.example.com diff --git a/docs/curl.1 b/docs/curl.1 index af5d5f3..b47bc4b 100644 --- a/docs/curl.1 +++ b/docs/curl.1 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * 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 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH curl 1 "30 Nov 2014" "Curl 7.40.0" "Curl Manual" +.TH curl 1 "27 July 2012" "Curl 7.27.0" "Curl Manual" .SH NAME curl \- transfer a URL .SH SYNOPSIS @@ -30,8 +30,8 @@ curl \- transfer a URL .B curl is a tool to transfer data from or to a server, using one of the supported protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, -LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET -and TFTP). The command is designed to work without user interaction. +LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP). The +command is designed to work without user interaction. curl offers a busload of useful tricks like proxy support, user authentication, FTP upload, HTTP post, SSL connections, cookies, file transfer @@ -48,20 +48,18 @@ RFC 3986. You can specify multiple URLs or parts of URLs by writing part sets within braces as in: - http://site.{one,two,three}.com + http://site.{one,two,three}.com or you can get sequences of alphanumeric series by using [] as in: - ftp://ftp.numericals.com/file[1-100].txt - - ftp://ftp.numericals.com/file[001-100].txt (with leading zeros) - - ftp://ftp.letters.com/file[a-z].txt + ftp://ftp.numericals.com/file[1-100].txt + ftp://ftp.numericals.com/file[001-100].txt (with leading zeros) + ftp://ftp.letters.com/file[a-z].txt Nested sequences are not supported, but you can use several ones next to each other: - http://any.org/archive[1996-1999]/vol[1-4]/part{a,b,c}.html + http://any.org/archive[1996-1999]/vol[1-4]/part{a,b,c}.html You can specify any amount of URLs on the command line. They will be fetched in a sequential manner in the specified order. @@ -69,19 +67,8 @@ in a sequential manner in the specified order. You can specify a step counter for the ranges to get every Nth number or letter: - http://www.numericals.com/file[1-100:10].txt - - http://www.letters.com/file[a-z:2].txt - -When using [] or {} sequences when invoked from a command line prompt, you -probably have to put the full URL within double quotes to avoid the shell from -interfering with it. This also goes for other characters treated special, like -for example '&', '?' and '*'. - -Provide the IPv6 zone index in the URL with an escaped percentage sign and the -interface name. Like in - - http://[fe80::3%25eth0]/ + http://www.numericals.com/file[1-100:10].txt + http://www.letters.com/file[a-z:2].txt If you specify URL without protocol:// prefix, curl will attempt to guess what protocol you might want. It will then default to HTTP but try other protocols @@ -170,23 +157,23 @@ You can use options \fI--tlsv1.0\fP, \fI--tlsv1.1\fP, and \fI--tlsv1.2\fP to control the TLS version more precisely (if the SSL backend in use supports such a level of control). .IP "-2, --sslv2" -(SSL) Forces curl to use SSL version 2 when negotiating with a remote SSL -server. Sometimes curl is built without SSLv2 support. SSLv2 is widely -considered insecure. +(SSL) +Forces curl to use SSL version 2 when negotiating with a remote SSL server. .IP "-3, --sslv3" -(SSL) Forces curl to use SSL version 3 when negotiating with a remote SSL -server. Sometimes curl is built without SSLv3 support. +(SSL) +Forces curl to use SSL version 3 when negotiating with a remote SSL server. .IP "-4, --ipv4" -This option tells curl to resolve names to IPv4 addresses only, and not for -example try IPv6. +If curl is capable of resolving an address to multiple IP versions (which it +is if it is IPv6-capable), this option tells curl to resolve names to IPv4 +addresses only. .IP "-6, --ipv6" -This option tells curl to resolve names to IPv6 addresses only, and not for -example try IPv4. +If curl is capable of resolving an address to multiple IP versions (which it +is if it is IPv6-capable), this option tells curl to resolve names to IPv6 +addresses only. .IP "-a, --append" -(FTP/SFTP) When used in an upload, this makes curl append to the target file -instead of overwriting it. If the remote file doesn't exist, it will be -created. Note that this flag is ignored by some SFTP servers (including -OpenSSH). +(FTP/SFTP) When used in an upload, this will tell curl to append to the target +file instead of overwriting it. If the file doesn't exist, it will be created. +Note that this flag is ignored by some SSH servers (including OpenSSH). .IP "-A, --user-agent " (HTTP) Specify the User-Agent string to send to the HTTP server. Some badly done CGIs fail if this field isn't set to "Mozilla/4.0". To encode blanks in @@ -207,9 +194,10 @@ since it may require data to be sent twice and then the client must be able to rewind. If the need should arise when uploading from stdin, the upload operation will fail. .IP "-b, --cookie " -(HTTP) Pass the data to the HTTP server as a cookie. It is supposedly the data -previously received from the server in a "Set-Cookie:" line. The data should -be in the format "NAME1=VALUE1; NAME2=VALUE2". +(HTTP) +Pass the data to the HTTP server as a cookie. It is supposedly the +data previously received from the server in a "Set-Cookie:" line. +The data should be in the format "NAME1=VALUE1; NAME2=VALUE2". If no '=' symbol is used in the line, it is treated as a filename to use to read previously stored cookie lines from, which should be used in this session @@ -219,29 +207,26 @@ in combination with the \fI-L, --location\fP option. The file format of the file to read cookies from should be plain HTTP headers or the Netscape/Mozilla cookie file format. -The file specified with \fI-b, --cookie\fP is only used as input. No cookies -will be written to the file. To store cookies, use the \fI-c, --cookie-jar\fP -option. +\fBNOTE\fP that the file specified with \fI-b, --cookie\fP is only used as +input. No cookies will be stored in the file. To store cookies, use the +\fI-c, --cookie-jar\fP option or you could even save the HTTP headers to a file +using \fI-D, --dump-header\fP! If this option is used several times, the last one will be used. .IP "-B, --use-ascii" -(FTP/LDAP) Enable ASCII transfer. For FTP, this can also be enforced by using -an URL that ends with ";type=A". This option causes data sent to stdout to be -in text mode for win32 systems. +(FTP/LDAP) Enable ASCII transfer. For FTP, this can also be +enforced by using an URL that ends with ";type=A". This option causes data +sent to stdout to be in text mode for win32 systems. .IP "--basic" -(HTTP) Tells curl to use HTTP Basic authentication with the remote host. This -is the default and this option is usually pointless, unless you use it to -override a previously set option that sets a different authentication method -(such as \fI--ntlm\fP, \fI--digest\fP, or \fI--negotiate\fP). - -Used together with \fI-u, --user\fP and \fI-x, --proxy\fP. - -See also \fI--proxy-basic\fP. +(HTTP) Tells curl to use HTTP Basic authentication. This is the default and +this option is usually pointless, unless you use it to override a previously +set option that sets a different authentication method (such as \fI--ntlm\fP, +\fI--digest\fP, or \fI--negotiate\fP). .IP "-c, --cookie-jar " (HTTP) Specify to which file you want curl to write all cookies after a completed operation. Curl writes all cookies previously read from a specified file as well as all cookies received from remote server(s). If no cookies are -known, no data will be written. The file will be written using the Netscape +known, no file will be written. The file will be written using the Netscape cookie file format. If you set the file name to a single dash, "-", the cookies will be written to stdout. @@ -281,12 +266,11 @@ If this option is used several times, the last one will be used. supports, and save the uncompressed document. If this option is used and the server sends an unsupported encoding, curl will report an error. .IP "--connect-timeout " -Maximum time in seconds that you allow curl's connection to take. This only -limits the connection phase, so if curl connects within the given period it -will continue - if not it will exit. Since version 7.32.0, this option -accepts decimal values. - -See also the \fI-m, --max-time\fP option. +Maximum time in seconds that you allow the connection to the server to take. +This only limits the connection phase, once curl has connected this option is +of no more use. Since 7.32.0, this option accepts decimal values, but the +actual timeout will decrease in accuracy as the specified timeout increases in +decimal precision. See also the \fI-m, --max-time\fP option. If this option is used several times, the last one will be used. .IP "--create-dirs" @@ -298,9 +282,7 @@ uses no dir or if the dirs it mentions already exist, no dir will be created. To create remote directories when using FTP or SFTP, try \fI--ftp-create-dirs\fP. .IP "--crlf" -Convert LF to CRLF in upload. Useful for MVS (OS/390). - -(SMTP added in 7.40.0) +(FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390). .IP "--crlfile " (HTTPS/FTPS) Provide a file using PEM format with a Certificate Revocation List that may specify peer certificates that are to be considered revoked. @@ -336,12 +318,13 @@ Write the protocol headers to the specified file. This option is handy to use when you want to store the headers that an HTTP site sends to you. Cookies from the headers could then be read in a second curl invocation by using the \fI-b, --cookie\fP option! The -\fI-c, --cookie-jar\fP option is a better way to store cookies. +\fI-c, --cookie-jar\fP option is however a better way to store cookies. When used in FTP, the FTP server response lines are considered being "headers" and thus are saved there. If this option is used several times, the last one will be used. + .IP "--data-ascii " See \fI-d, --data\fP. .IP "--data-binary " @@ -539,35 +522,12 @@ OpenSSL-powered curl to make SSL-connections much more efficiently than using If this option is set, the default capath value will be ignored, and if it is used several times, the last one will be used. -.IP "--pinnedpubkey " -(SSL) Tells curl to use the specified public key file to verify the peer. The -file must contain a single public key in PEM or DER format. - -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. - -This is currently only implemented in the OpenSSL, GnuTLS and GSKit backends. - -If this option is used several times, the last one will be used. -(Added in 7.39.0) -.IP "--cert-status" -(SSL) Tells curl to verify the status of the server certificate by using the -Certificate Status Request (aka. OCSP stapling) TLS extension. - -If this option is enabled and the server sends an invalid (e.g. expired) -response, if the response suggests that the server certificate has been revoked, -or no response at all is received, the verification fails. - -This is currently only implemented in the GnuTLS and NSS backends. -(Added in 7.41.0) .IP "-f, --fail" (HTTP) Fail silently (no output at all) on server errors. This is mostly done -to better enable scripts etc to better deal with failed attempts. In normal -cases when an HTTP server fails to deliver a document, it returns an HTML -document stating so (which often also describes why and more). This flag will -prevent curl from outputting that and return error 22. +to better enable scripts etc to better deal with failed attempts. In +normal cases when an HTTP server fails to deliver a document, it returns an +HTML document stating so (which often also describes why and more). This flag +will prevent curl from outputting that and return error 22. This method is not fail-safe and there are occasions where non-successful response codes will slip through, especially when authentication is involved @@ -576,11 +536,11 @@ response codes will slip through, especially when authentication is involved (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. +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 your password file to the server, where \&'password' is the name of the form-field to which /etc/passwd will be the @@ -739,10 +699,6 @@ 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 for a proxy. -Example: - -\&# curl -H "X-First-Name: Joe" http://192.168.0.1/ - This option can be used multiple times to add/replace/remove multiple headers. .IP "--hostpubmd5 " (SCP/SFTP) Pass a string containing 32 hexadecimal digits. The string should @@ -823,12 +779,12 @@ 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 -Unix-like systems (which returns the home dir given the current user in your +UNIX-like systems (which returns the home dir given the current user in your system). On Windows, it then checks for the APPDATA variable, or as a last resort the '%USERPROFILE%\\Application Data'. 2) On windows, if there is no _curlrc file in the home dir, it checks for one -in the same dir the curl executable is placed. On Unix-like systems, it will +in the same dir the curl executable is placed. On UNIX-like systems, it will simply try to load .curlrc from the determined home dir. .nf @@ -857,8 +813,7 @@ If this option is used several times, the last one will be used. If unspecified, the option defaults to 60 seconds. .IP "--key " (SSL/SSH) Private key file name. Allows you to provide your private key in this -separate file. For SSH, if not specified, curl tries the following candidates -in order: '~/.ssh/id_rsa', '~/.ssh/id_dsa', './id_rsa', './id_dsa'. +separate file. If this option is used several times, the last one will be used. .IP "--key-type " @@ -872,8 +827,9 @@ If this option is used several times, the last one will be used. should be one of 'clear', 'safe', 'confidential', or 'private'. Should you use a level that is not one of these, 'private' will instead be used. -This option requires a library built with kerberos4 support. This is not -very common. Use \fI-V, --version\fP to see if your curl supports it. +This option requires a library built with kerberos4 or GSSAPI +(GSS-Negotiate) support. This is not very common. Use \fI-V, --version\fP to +see if your curl supports it. If this option is used several times, the last one will be used. .IP "-l, --list-only" @@ -910,10 +866,6 @@ When curl follows a redirect and the request is not a plain GET (for example POST or PUT), it will do the following request with a GET if the HTTP response was 301, 302, or 303. If the response code was any other 3xx code, curl will re-send the following request using the same unmodified method. - -You can tell curl to not change the non-GET request method to GET after a 30x -response by using the dedicated options for that: \fI--post301\fP, -\fI--post302\fP and \fI-post303\fP. .IP "--libcurl " Append this option to any ordinary curl command line, and you will get a libcurl-using C source code written to the file that does the equivalent @@ -922,10 +874,9 @@ of what your command-line operation does! If this option is used several times, the last given file name will be used. (Added in 7.16.1) .IP "--limit-rate " -Specify the maximum transfer rate you want curl to use - for both downloads -and uploads. This feature is useful if you have a limited pipe and you'd like -your transfer not to use your entire bandwidth. To make it slower than it -otherwise would be. +Specify the maximum transfer rate you want curl to use. This feature is useful +if you have a limited pipe and you'd like your transfer not to use your entire +bandwidth. 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 @@ -1036,7 +987,7 @@ in Metalink file, hash check will fail. .IP "-n, --netrc" Makes curl scan the \fI.netrc\fP (\fI_netrc\fP on Windows) file in the user's home directory for login name and password. This is typically used for FTP on -Unix. If used with HTTP, curl will enable user authentication. See +UNIX. If used with HTTP, curl will enable user authentication. See .BR netrc(4) or .BR ftp(1) @@ -1073,13 +1024,18 @@ Very similar to \fI--netrc\fP, but this option makes the .netrc usage \fBoptional\fP and not mandatory as the \fI--netrc\fP option does. .IP "--negotiate" -(HTTP) Enables Negotiate (SPNEGO) authentication. +(HTTP) Enables GSS-Negotiate authentication. The GSS-Negotiate method was +designed by Microsoft and is used in their web applications. It is primarily +meant as a support for Kerberos5 authentication but may be also used along +with another authentication method. For more information see IETF draft +draft-brezak-spnego-http-04.txt. -If you want to enable Negotiate (SPNEGO) for proxy authentication, then use +If you want to enable Negotiate for your proxy authentication, then use \fI--proxy-negotiate\fP. -This option requires a library built with GSS-API or SSPI support. Use \fI-V, ---version\fP to see if your curl supports GSS-API/SSPI and SPNEGO. +This option requires a library built with GSSAPI support. This is +not very common. Use \fI-V, --version\fP to see if your version supports +GSS-Negotiate. When using this option, you must also provide a fake \fI-u, --user\fP option to activate the authentication code properly. Sending a '-u :' is enough as the @@ -1298,8 +1254,8 @@ the default authentication method curl uses with proxies. 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. .IP "--proxy-negotiate" -Tells curl to use HTTP Negotiate (SPNEGO) authentication when communicating -with the given proxy. Use \fI--negotiate\fP for enabling HTTP Negotiate (SPNEGO) +Tells curl to use HTTP Negotiate authentication when communicating +with the given proxy. Use \fI--negotiate\fP for enabling HTTP Negotiate with a remote host. (Added in 7.17.1) .IP "--proxy-ntlm" Tells curl to use HTTP NTLM authentication when communicating with the given @@ -1316,11 +1272,6 @@ protocol instead of the default HTTP 1.1. separate file. If this option is used several times, the last one will be used. - -(As of 7.39.0, curl attempts to automatically extract the public key from the -private key file, so passing this option is generally not required. Note that -this public key extraction requires libcurl to be linked against a copy of -libssh2 1.2.8 or higher that is itself linked against OpenSSL.) .IP "-q" If used as the first parameter on the command line, the \fIcurlrc\fP config file will not be read and used. See the \fI-K, --config\fP for details on the @@ -1567,7 +1518,7 @@ sockd/proxy-name --socks5 proxy-name \fI--socks5-gssapi-service\fP sockd/real-name 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-nec" -As part of the GSS-API negotiation a protection mode is negotiated. RFC 1961 +As part of the gssapi negotiation a protection mode is negotiated. RFC 1961 says in section 4.3/4.4 it should be protected, but the NEC reference implementation does not. The option \fI--socks5-gssapi-nec\fP allows the unprotected exchange of the protection mode negotiation. (Added in 7.19.4). @@ -1672,9 +1623,6 @@ If this option is used several times, the last one will be used. .IP "--trace-time" Prepends a time stamp to each trace or verbose line that curl displays. (Added in 7.14.0) -.IP "--unix-socket " -(HTTP) Connect through this Unix domain socket, instead of using the -network. (Added in 7.40.0) .IP "-u, --user " Specify the user name and password to use for server authentication. Overrides \fI-n, --netrc\fP and \fI--netrc-optional\fP. @@ -1685,31 +1633,17 @@ The user name and passwords are split up on the first colon, which makes it impossible to use a colon in the user name with this option. The password can, still. -When using Kerberos V5 with a Windows based server you should include the -Windows domain name in the user name, in order for the server to succesfully -obtain a Kerberos Ticket. If you don't then the initial authentication -handshake may fail. - -When using NTLM, the user name can be specified simply as the user name, -without the domain, if there is a single domain and forest in your setup -for example. - -To specify the domain name use either Down-Level Logon Name or UPN (User -Principal Name) formats. For example, EXAMPLE\\user and user@example.com -respectively. - -If you use a Windows SSPI-enabled curl binary and perform Kerberos V5, -Negotiate, NTLM or Digest authentication then you can tell curl to select -the user name and password from your environment by specifying a single colon -with this option: "-u :". +If you use an SSPI-enabled curl binary and perform NTLM authentication, you +can force curl to select the user name and password from your environment by +specifying a single colon with this option: "-u :". If this option is used several times, the last one will be used. .IP "-U, --proxy-user " Specify the user name and password to use for proxy authentication. -If you use a Windows SSPI-enabled curl binary and do either Negotiate or NTLM -authentication then you can tell curl to select the user name and password -from your environment by specifying a single colon with this option: "-U :". +If you use an SSPI-enabled curl binary and do NTLM authentication, you can +force curl to pick up the user name and password from your environment by +simply specifying a single colon with this option: "-U :". If this option is used several times, the last one will be used. .IP "--url " @@ -1719,11 +1653,10 @@ URL(s) in a config file. This option may be used any number of times. To control where this URL is written, use the \fI-o, --output\fP or the \fI-O, --remote-name\fP options. .IP "-v, --verbose" -Be more verbose/talkative during the operation. Useful for debugging and -seeing what's going on "under the hood". A line starting with '>' means -"header data" sent by curl, '<' means "header data" received by curl that is -hidden in normal cases, and a line starting with '*' means additional info -provided by curl. +Makes the fetching more verbose/talkative. Mostly useful for debugging. A line +starting with '>' means "header data" sent by curl, '<' means "header data" +received by curl that is hidden in normal cases, and a line starting with '*' +means additional info provided by curl. Note that if you only want HTTP headers in the output, \fI-i, --include\fP might be the option you're looking for. @@ -1735,10 +1668,10 @@ This option overrides previous uses of \fI--trace-ascii\fP or \fI--trace\fP. Use \fI-s, --silent\fP to make curl quiet. .IP "-w, --write-out " -Make curl display information on stdout after a completed transfer. The format -is a string that may contain plain text mixed with any number of -variables. The format can be specified as a literal "string", or you can have -curl read the format from a file with "@filename" and to tell curl to read the +Defines what to display on stdout after a completed and successful +operation. The format is a string that may contain plain text mixed with any +number of variables. The string can be specified as "string", to get read from +a particular file you specify it "@filename" and to tell curl to read the format from stdin you write "@-". The variables present in the output format will be substituted by the value or @@ -1959,8 +1892,7 @@ than the specified date/time. If this option is used several times, the last one will be used. .IP "-h, --help" -Usage help. This lists all current command line options with a short -description. +Usage help. .IP "-M, --manual" Manual. Display the huge help text. .IP "-V, --version" @@ -1980,32 +1912,29 @@ You can use IPv6 with this. .IP "krb4" Krb4 for FTP is supported. .IP "SSL" -SSL versions of various protocols are supported, such as HTTPS, FTPS, POP3S -and so on. +HTTPS and FTPS are supported. .IP "libz" Automatic decompression of compressed files over HTTP is supported. .IP "NTLM" NTLM authentication is supported. +.IP "GSS-Negotiate" +Negotiate authentication and krb5 for FTP is supported. .IP "Debug" This curl uses a libcurl built with Debug. This enables more error-tracking and memory debugging etc. For curl-developers only! .IP "AsynchDNS" -This curl uses asynchronous name resolves. Asynchronous name resolves can be -done using either the c-ares or the threaded resolver backends. +This curl uses asynchronous name resolves. .IP "SPNEGO" -SPNEGO authentication is supported. +SPNEGO Negotiate authentication is supported. .IP "Largefile" This curl supports transfers of large files, files larger than 2GB. .IP "IDN" This curl supports IDN - international domain names. -.IP "GSS-API" -GSS-API is supported. .IP "SSPI" -SSPI is supported. +SSPI is supported. If you use NTLM and set a blank user name, curl will +authenticate with your current user and password. .IP "TLS-SRP" SRP (Secure Remote Password) authentication is supported for TLS. -.IP "HTTP2" -HTTP/2 support has been built-in. .IP "Metalink" This curl supports Metalink (both version 3 and 4 (RFC 5854)), which describes mirrors and hashes. curl will use mirrors for failover if @@ -2221,8 +2150,6 @@ unable to parse FTP file list FTP chunk callback reported error .IP 89 No connection available, the session will be queued -.IP 90 -SSL public key does not matched pinned public key .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 5d95a8a..a85fff4 100644 --- a/docs/examples/10-at-a-time.c +++ b/docs/examples/10-at-a-time.c @@ -62,6 +62,7 @@ static const char *urls[] = { "http://www.uefa.com", "http://www.ieee.org", "http://www.apple.com", + "http://www.sony.com", "http://www.symantec.com", "http://www.zdnet.com", "http://www.fujitsu.com", diff --git a/docs/examples/Makefile.inc b/docs/examples/Makefile.inc index 6c8df8e..fc690ac 100644 --- a/docs/examples/Makefile.inc +++ b/docs/examples/Makefile.inc @@ -1,42 +1,20 @@ -#*************************************************************************** -# _ _ ____ _ -# 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 http://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. -# -########################################################################### - # These are all libcurl example programs to be test compiled check_PROGRAMS = 10-at-a-time anyauthput cookie_interface debug fileupload \ fopen ftpget ftpgetresp ftpupload getinfo getinmemory http-post httpput \ 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 \ - 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 + 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 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 # 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 \ +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 \ + smooth-gtk-thread.c version-check.pl href_extractor.c asiohiper.cpp \ multi-uv.c xmlstream.c usercertinmem.c sessioninfo.c diff --git a/docs/examples/Makefile.m32 b/docs/examples/Makefile.m32 index f607013..6bfb9fa 100644 --- a/docs/examples/Makefile.m32 +++ b/docs/examples/Makefile.m32 @@ -38,7 +38,7 @@ ZLIB_PATH = ../../../zlib-1.2.8 endif # Edit the path below to point to the base of your OpenSSL package. ifndef OPENSSL_PATH -OPENSSL_PATH = ../../../openssl-0.9.8zc +OPENSSL_PATH = ../../../openssl-0.9.8y endif # Edit the path below to point to the base of your LibSSH2 package. ifndef LIBSSH2_PATH @@ -148,6 +148,9 @@ endif ifeq ($(findstring -sspi,$(CFG)),-sspi) SSPI = 1 endif +ifeq ($(findstring -spnego,$(CFG)),-spnego) +SPNEGO = 1 +endif ifeq ($(findstring -ldaps,$(CFG)),-ldaps) LDAPS = 1 endif @@ -227,6 +230,9 @@ ifdef SSPI CFLAGS += -DUSE_SCHANNEL endif endif +ifdef SPNEGO + CFLAGS += -DHAVE_SPNEGO +endif ifdef IPV6 CFLAGS += -DENABLE_IPV6 -D_WIN32_WINNT=0x0501 endif diff --git a/docs/examples/Makefile.netware b/docs/examples/Makefile.netware index 3fd6b3e..2816cbd 100644 --- a/docs/examples/Makefile.netware +++ b/docs/examples/Makefile.netware @@ -19,7 +19,7 @@ endif # Edit the path below to point to the base of your OpenSSL package. ifndef OPENSSL_PATH -OPENSSL_PATH = ../../../openssl-0.9.8zc +OPENSSL_PATH = ../../../openssl-0.9.8y endif # Edit the path below to point to the base of your LibSSH2 package. @@ -211,6 +211,9 @@ endif ifeq ($(findstring -idn,$(CFG)),-idn) WITH_IDN = 1 endif +ifeq ($(findstring -spnego,$(CFG)),-spnego) +WITH_SPNEGO = 1 +endif ifeq ($(findstring -ipv6,$(CFG)),-ipv6) ENABLE_IPV6 = 1 endif @@ -244,6 +247,10 @@ ifdef WITH_SSL LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/ssl.$(LIBEXT) LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/crypto.$(LIBEXT) IMPORTS += GetProcessSwitchCount RunningProcess +ifdef WITH_SPNEGO + # INCLUDES += -I$(FBOPENSSL_PATH)/include + LDLIBS += $(FBOPENSSL_PATH)/nw/fbopenssl.$(LIBEXT) +endif else ifdef WITH_AXTLS INCLUDES += -I$(AXTLS_PATH)/inc diff --git a/docs/examples/asiohiper.cpp b/docs/examples/asiohiper.cpp index eb5cd03..44836fd 100644 --- a/docs/examples/asiohiper.cpp +++ b/docs/examples/asiohiper.cpp @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2012 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 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 @@ -84,7 +84,7 @@ static int multi_timer_cb(CURLM *multi, long timeout_ms, GlobalInfo *g) /* cancel running timer */ timer.cancel(); - if(timeout_ms > 0) + if ( timeout_ms > 0 ) { /* update timer */ timer.expires_from_now(boost::posix_time::millisec(timeout_ms)); @@ -103,44 +103,26 @@ static int multi_timer_cb(CURLM *multi, long timeout_ms, GlobalInfo *g) /* Die if we get a bad CURLMcode somewhere */ static void mcode_or_die(const char *where, CURLMcode code) { - if(CURLM_OK != code) + if ( CURLM_OK != code ) { const char *s; - switch(code) + switch ( code ) { - case CURLM_CALL_MULTI_PERFORM: - s = "CURLM_CALL_MULTI_PERFORM"; + case CURLM_CALL_MULTI_PERFORM: s="CURLM_CALL_MULTI_PERFORM"; break; + 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_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, "\nERROR: %s returns %s", where, s); /* ignore this error */ return; } - fprintf(MSG_OUT, "\nERROR: %s returns %s", where, s); - exit(code); } } @@ -157,9 +139,9 @@ static void check_multi_info(GlobalInfo *g) fprintf(MSG_OUT, "\nREMAINING: %d", g->still_running); - while((msg = curl_multi_info_read(g->multi, &msgs_left))) + while ((msg = curl_multi_info_read(g->multi, &msgs_left))) { - if(msg->msg == CURLMSG_DONE) + if (msg->msg == CURLMSG_DONE) { easy = msg->easy_handle; res = msg->data.result; @@ -175,19 +157,17 @@ 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, - int action) +static void event_cb(GlobalInfo * g, boost::asio::ip::tcp::socket * tcp_socket, int action) { fprintf(MSG_OUT, "\nevent_cb: action=%d", action); CURLMcode rc; - rc = curl_multi_socket_action(g->multi, tcp_socket->native_handle(), action, - &g->still_running); + rc = curl_multi_socket_action(g->multi, tcp_socket->native_handle(), action, &g->still_running); mcode_or_die("event_cb: curl_multi_socket_action", rc); check_multi_info(g); - if(g->still_running <= 0) + if ( g->still_running <= 0 ) { fprintf(MSG_OUT, "\nlast transfer done, kill timeout"); timer.cancel(); @@ -197,7 +177,7 @@ static void event_cb(GlobalInfo *g, boost::asio::ip::tcp::socket *tcp_socket, /* Called by asio when our timeout expires */ static void timer_cb(const boost::system::error_code & error, GlobalInfo *g) { - if(!error) + if ( !error) { fprintf(MSG_OUT, "\ntimer_cb: "); @@ -214,7 +194,7 @@ static void remsock(int *f, GlobalInfo *g) { fprintf(MSG_OUT, "\nremsock: "); - if(f) + if ( f ) { free(f); } @@ -226,10 +206,9 @@ static void setsock(int *fdp, curl_socket_t s, CURL*e, int act, GlobalInfo*g) std::map::iterator it = socket_map.find(s); - if(it == socket_map.end()) + if ( it == socket_map.end() ) { fprintf(MSG_OUT, "\nsocket %d is a c-ares socket, ignoring", s); - return; } @@ -237,36 +216,44 @@ static void setsock(int *fdp, curl_socket_t s, CURL*e, int act, GlobalInfo*g) *fdp = act; - if(act == CURL_POLL_IN) + if ( act == CURL_POLL_IN ) { fprintf(MSG_OUT, "\nwatching for socket to become readable"); tcp_socket->async_read_some(boost::asio::null_buffers(), - boost::bind(&event_cb, g, tcp_socket, act)); + boost::bind(&event_cb, g, + tcp_socket, + act)); } - else if (act == CURL_POLL_OUT) + else if ( act == CURL_POLL_OUT ) { fprintf(MSG_OUT, "\nwatching for socket to become writable"); tcp_socket->async_write_some(boost::asio::null_buffers(), - boost::bind(&event_cb, g, tcp_socket, act)); + boost::bind(&event_cb, g, + tcp_socket, + act)); } - else if(act == CURL_POLL_INOUT) + else if ( act == CURL_POLL_INOUT ) { fprintf(MSG_OUT, "\nwatching for socket to become readable & writable"); tcp_socket->async_read_some(boost::asio::null_buffers(), - boost::bind(&event_cb, g, tcp_socket, act)); + boost::bind(&event_cb, g, + tcp_socket, + act)); tcp_socket->async_write_some(boost::asio::null_buffers(), - boost::bind(&event_cb, g, tcp_socket, act)); + boost::bind(&event_cb, g, + tcp_socket, + act)); } } + static void addsock(curl_socket_t s, CURL *easy, int action, GlobalInfo *g) { - /* fdp is used to store current action */ - int *fdp = (int *) calloc(sizeof(int), 1); + int *fdp = (int *)calloc(sizeof(int), 1); /* fdp is used to store current action */ setsock(fdp, s, easy, action, g); curl_multi_assign(g->multi, s, fdp); @@ -278,20 +265,20 @@ static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp) fprintf(MSG_OUT, "\nsock_cb: socket=%d, what=%d, sockp=%p", s, what, sockp); GlobalInfo *g = (GlobalInfo*) cbp; - int *actionp = (int *) sockp; - const char *whatstr[] = { "none", "IN", "OUT", "INOUT", "REMOVE"}; + int *actionp = (int*) sockp; + const char *whatstr[]={ "none", "IN", "OUT", "INOUT", "REMOVE"}; fprintf(MSG_OUT, "\nsocket callback: s=%d e=%p what=%s ", s, e, whatstr[what]); - if(what == CURL_POLL_REMOVE) + if ( what == CURL_POLL_REMOVE ) { fprintf(MSG_OUT, "\n"); remsock(actionp, g); } else { - if(!actionp) + if ( !actionp ) { fprintf(MSG_OUT, "\nAdding data: %s", whatstr[what]); addsock(s, e, what, g); @@ -304,19 +291,19 @@ static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp) setsock(actionp, s, e, what, g); } } - return 0; } + /* CURLOPT_WRITEFUNCTION */ static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *data) { size_t written = size * nmemb; - char* pBuffer = (char *) malloc(written + 1); + char* pBuffer = (char*)malloc(written + 1); strncpy(pBuffer, (const char *)ptr, written); - pBuffer[written] = '\0'; + pBuffer [written] = '\0'; fprintf(MSG_OUT, "%s", pBuffer); @@ -325,12 +312,12 @@ static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *data) return written; } + /* CURLOPT_PROGRESSFUNCTION */ -static int prog_cb(void *p, double dltotal, double dlnow, double ult, - double uln) +static int prog_cb (void *p, double dltotal, double dlnow, double ult, + double uln) { ConnInfo *conn = (ConnInfo *)p; - (void)ult; (void)uln; @@ -341,15 +328,16 @@ static int prog_cb(void *p, double dltotal, double dlnow, double ult, } /* CURLOPT_OPENSOCKETFUNCTION */ -static curl_socket_t opensocket(void *clientp, curlsocktype purpose, +static curl_socket_t opensocket(void *clientp, + curlsocktype purpose, struct curl_sockaddr *address) { fprintf(MSG_OUT, "\nopensocket :"); curl_socket_t sockfd = CURL_SOCKET_BAD; - /* restrict to IPv4 */ - if(purpose == CURLSOCKTYPE_IPCXN && address->family == AF_INET) + /* restrict to ipv4 */ + if (purpose == CURLSOCKTYPE_IPCXN && address->family == AF_INET) { /* create a tcp socket object */ boost::asio::ip::tcp::socket *tcp_socket = new boost::asio::ip::tcp::socket(io_service); @@ -358,9 +346,9 @@ static curl_socket_t opensocket(void *clientp, curlsocktype purpose, boost::system::error_code ec; tcp_socket->open(boost::asio::ip::tcp::v4(), ec); - if(ec) + if (ec) { - /* An error occurred */ + //An error occurred std::cout << std::endl << "Couldn't open socket [" << ec << "][" << ec.message() << "]"; fprintf(MSG_OUT, "\nERROR: Returning CURL_SOCKET_BAD to signal error"); } @@ -384,7 +372,7 @@ static int closesocket(void *clientp, curl_socket_t item) std::map::iterator it = socket_map.find(item); - if(it != socket_map.end()) + if ( it != socket_map.end() ) { delete it->second; socket_map.erase(it); @@ -394,21 +382,22 @@ static int closesocket(void *clientp, curl_socket_t item) } /* Create a new easy handle, and add it to the global curl_multi */ -static void new_conn(char *url, GlobalInfo *g) +static void new_conn(char *url, GlobalInfo *g ) { ConnInfo *conn; CURLMcode rc; - conn = (ConnInfo *) calloc(1, sizeof(ConnInfo)); + conn = (ConnInfo *)calloc(1, sizeof(ConnInfo)); + memset(conn, 0, sizeof(ConnInfo)); + conn->error[0]='\0'; conn->easy = curl_easy_init(); - if(!conn->easy) + + if ( !conn->easy ) { fprintf(MSG_OUT, "\ncurl_easy_init() failed, exiting!"); - exit(2); } - conn->global = g; conn->url = strdup(url); curl_easy_setopt(conn->easy, CURLOPT_URL, conn->url); @@ -442,7 +431,6 @@ int main(int argc, char **argv) { GlobalInfo g; CURLMcode rc; - (void)argc; (void)argv; @@ -462,6 +450,5 @@ int main(int argc, char **argv) curl_multi_cleanup(g.multi); fprintf(MSG_OUT, "\ndone.\n"); - return 0; } diff --git a/docs/examples/externalsocket.c b/docs/examples/externalsocket.c index 5486d12..1b326c8 100644 --- a/docs/examples/externalsocket.c +++ b/docs/examples/externalsocket.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * 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 @@ -38,7 +38,7 @@ #include /* socket definitions */ #include #include /* inet (3) funtions */ -#include /* misc. Unix functions */ +#include /* misc. UNIX functions */ #endif #include diff --git a/docs/examples/fopen.c b/docs/examples/fopen.c index 3d2a817..6fe5c0f 100644 --- a/docs/examples/fopen.c +++ b/docs/examples/fopen.c @@ -128,7 +128,6 @@ static int fill_buffer(URL_FILE *file, size_t want) fd_set fdexcep; struct timeval timeout; int rc; - CURLMcode mc; /* curl_multi_fdset() return code */ /* only attempt to fill buffer if transactions still running and buffer * doesnt exceed required size already @@ -159,35 +158,15 @@ static int fill_buffer(URL_FILE *file, size_t want) } /* get file descriptors from the transfers */ - mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd); + curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd); - if(mc != CURLM_OK) - { - fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc); - break; - } + /* In a real-world program you OF COURSE check the return code of the + function calls. On success, the value of maxfd is guaranteed to be + greater or equal than -1. We call select(maxfd + 1, ...), specially + in case of (maxfd == -1), we call select(0, ...), which is basically + equal to sleep. */ - /* 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); - } + rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); switch(rc) { case -1: diff --git a/docs/examples/ftp-wildcard.c b/docs/examples/ftp-wildcard.c index d175ddf..5a2a103 100644 --- a/docs/examples/ftp-wildcard.c +++ b/docs/examples/ftp-wildcard.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * 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 @@ -26,9 +26,9 @@ struct callback_data { FILE *output; }; -static long file_is_coming(struct curl_fileinfo *finfo, - struct callback_data *data, - int remains); +static long file_is_comming(struct curl_fileinfo *finfo, + struct callback_data *data, + int remains); static long file_is_downloaded(struct callback_data *data); @@ -61,7 +61,7 @@ int main(int argc, char **argv) curl_easy_setopt(handle, CURLOPT_WILDCARDMATCH, 1L); /* callback is called before download of concrete file started */ - curl_easy_setopt(handle, CURLOPT_CHUNK_BGN_FUNCTION, file_is_coming); + curl_easy_setopt(handle, CURLOPT_CHUNK_BGN_FUNCTION, file_is_comming); /* callback is called after data from the file have been transferred */ curl_easy_setopt(handle, CURLOPT_CHUNK_END_FUNCTION, file_is_downloaded); @@ -89,9 +89,9 @@ int main(int argc, char **argv) return rc; } -static long file_is_coming(struct curl_fileinfo *finfo, - struct callback_data *data, - int remains) +static long file_is_comming(struct curl_fileinfo *finfo, + struct callback_data *data, + int remains) { printf("%3d %40s %10luB ", remains, finfo->filename, (unsigned long)finfo->size); diff --git a/docs/examples/httpcustomheader.c b/docs/examples/httpcustomheader.c index 8542ead..07ff959 100644 --- a/docs/examples/httpcustomheader.c +++ b/docs/examples/httpcustomheader.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * 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 @@ -31,25 +31,20 @@ int main(void) if(curl) { struct curl_slist *chunk = NULL; - /* Remove a header curl would otherwise add by itself */ - chunk = curl_slist_append(chunk, "Accept:"); - - /* Add a custom header */ + chunk = curl_slist_append(chunk, "Accept: moo"); chunk = curl_slist_append(chunk, "Another: yes"); - /* Modify a header curl otherwise adds differently */ - chunk = curl_slist_append(chunk, "Host: example.com"); - - /* Add a header with "blank" contents to the right of the colon. Note that - we're then using a semicolon in the string we pass to curl! */ - chunk = curl_slist_append(chunk, "X-silly-header;"); - - /* set our custom set of headers */ - res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk); - + /* request with the built-in Accept: */ curl_easy_setopt(curl, CURLOPT_URL, "localhost"); curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); + res = curl_easy_perform(curl); + /* Check for errors */ + if(res != CURLE_OK) + fprintf(stderr, "curl_easy_perform() failed: %s\n", + curl_easy_strerror(res)); + /* redo request with our own custom Accept: */ + res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk); res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) diff --git a/docs/examples/imap-multi.c b/docs/examples/imap-multi.c index c7dc130..601205a 100644 --- a/docs/examples/imap-multi.c +++ b/docs/examples/imap-multi.c @@ -88,7 +88,6 @@ int main(void) fd_set fdexcep; int maxfd = -1; int rc; - CURLMcode mc; /* curl_multi_fdset() return code */ long curl_timeo = -1; @@ -110,36 +109,15 @@ int main(void) timeout.tv_usec = (curl_timeo % 1000) * 1000; } - /* get file descriptors from the transfers */ - mc = curl_multi_fdset(mcurl, &fdread, &fdwrite, &fdexcep, &maxfd); + /* Get file descriptors from the transfers */ + curl_multi_fdset(mcurl, &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); - } + /* In a real-world program you OF COURSE check the return code of the + function calls. On success, the value of maxfd is guaranteed to be + greater or equal than -1. We call select(maxfd + 1, ...), specially in + case of (maxfd == -1), we call select(0, ...), which is basically equal + to sleep. */ + rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout); if(tvdiff(tvnow(), mp_start) > MULTI_PERFORM_HANG_TIMEOUT) { fprintf(stderr, diff --git a/docs/examples/multi-app.c b/docs/examples/multi-app.c index b825897..a5f71c5 100644 --- a/docs/examples/multi-app.c +++ b/docs/examples/multi-app.c @@ -73,7 +73,6 @@ int main(void) do { struct timeval timeout; int rc; /* select() return code */ - CURLMcode mc; /* curl_multi_fdset() return code */ fd_set fdread; fd_set fdwrite; @@ -100,35 +99,15 @@ int main(void) } /* get file descriptors from the transfers */ - mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd); + curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd); - if(mc != CURLM_OK) - { - fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc); - break; - } + /* In a real-world program you OF COURSE check the return code of the + function calls. On success, the value of maxfd is guaranteed to be + greater or equal than -1. We call select(maxfd + 1, ...), specially in + case of (maxfd == -1), we call select(0, ...), which is basically equal + to sleep. */ - /* 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); - } + rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); switch(rc) { case -1: diff --git a/docs/examples/multi-debugcallback.c b/docs/examples/multi-debugcallback.c index 5fb86be..8eedcee 100644 --- a/docs/examples/multi-debugcallback.c +++ b/docs/examples/multi-debugcallback.c @@ -147,7 +147,6 @@ int main(void) do { struct timeval timeout; int rc; /* select() return code */ - CURLMcode mc; /* curl_multi_fdset() return code */ fd_set fdread; fd_set fdwrite; @@ -174,35 +173,15 @@ int main(void) } /* get file descriptors from the transfers */ - mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd); + curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd); - if(mc != CURLM_OK) - { - fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc); - break; - } + /* In a real-world program you OF COURSE check the return code of the + function calls. On success, the value of maxfd is guaranteed to be + greater or equal than -1. We call select(maxfd + 1, ...), specially in + case of (maxfd == -1), we call select(0, ...), which is basically equal + to sleep. */ - /* 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); - } + rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); switch(rc) { case -1: diff --git a/docs/examples/multi-double.c b/docs/examples/multi-double.c index 0d8d0de..91422e6 100644 --- a/docs/examples/multi-double.c +++ b/docs/examples/multi-double.c @@ -62,7 +62,6 @@ int main(void) do { struct timeval timeout; int rc; /* select() return code */ - CURLMcode mc; /* curl_multi_fdset() return code */ fd_set fdread; fd_set fdwrite; @@ -89,35 +88,15 @@ int main(void) } /* get file descriptors from the transfers */ - mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd); + curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd); - if(mc != CURLM_OK) - { - fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc); - break; - } + /* In a real-world program you OF COURSE check the return code of the + function calls. On success, the value of maxfd is guaranteed to be + greater or equal than -1. We call select(maxfd + 1, ...), specially in + case of (maxfd == -1), we call select(0, ...), which is basically equal + to sleep. */ - /* 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); - } + rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); switch(rc) { case -1: diff --git a/docs/examples/multi-post.c b/docs/examples/multi-post.c index f511d66..965a2c3 100644 --- a/docs/examples/multi-post.c +++ b/docs/examples/multi-post.c @@ -83,7 +83,6 @@ int main(void) do { struct timeval timeout; int rc; /* select() return code */ - CURLMcode mc; /* curl_multi_fdset() return code */ fd_set fdread; fd_set fdwrite; @@ -110,35 +109,15 @@ int main(void) } /* get file descriptors from the transfers */ - mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd); + curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd); - if(mc != CURLM_OK) - { - fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc); - break; - } + /* In a real-world program you OF COURSE check the return code of the + function calls. On success, the value of maxfd is guaranteed to be + greater or equal than -1. We call select(maxfd + 1, ...), specially in + case of (maxfd == -1), we call select(0, ...), which is basically equal + to sleep. */ - /* 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); - } + rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); switch(rc) { case -1: diff --git a/docs/examples/multi-single.c b/docs/examples/multi-single.c index 47e23f5..37a01cd 100644 --- a/docs/examples/multi-single.c +++ b/docs/examples/multi-single.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2011, Daniel Stenberg, , 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,15 +31,6 @@ /* curl stuff */ #include -#ifdef _WIN32 -#define WAITMS(x) Sleep(x) -#else -/* Portable sleep for platforms other than Windows. */ -#define WAITMS(x) \ - struct timeval wait = { 0, (x) * 1000 }; \ - (void)select(0, NULL, NULL, NULL, &wait); -#endif - /* * Simply download a HTTP file. */ @@ -49,7 +40,6 @@ int main(void) CURLM *multi_handle; int still_running; /* keep number of running handles */ - int repeats = 0; curl_global_init(CURL_GLOBAL_DEFAULT); @@ -68,33 +58,56 @@ int main(void) curl_multi_perform(multi_handle, &still_running); do { - CURLMcode mc; /* curl_multi_wait() return code */ - int numfds; + struct timeval timeout; + int rc; /* select() 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; + } - /* wait for activity, timeout or "nothing" */ - mc = curl_multi_wait(multi_handle, NULL, 0, 1000, &numfds); + /* get file descriptors from the transfers */ + curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd); - if(mc != CURLM_OK) - { - fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc); - break; - } + /* In a real-world program you OF COURSE check the return code of the + function calls. On success, the value of maxfd is guaranteed to be + greater or equal than -1. We call select(maxfd + 1, ...), specially in + case of (maxfd == -1), we call select(0, ...), which is basically equal + to sleep. */ - /* 'numfds' being zero means either a timeout or no file descriptors to - wait for. Try timeout on first occurance, then assume no file - descriptors and no file descriptors to wait for means wait for 100 - milliseconds. */ + rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); - if(!numfds) { - repeats++; /* count number of repeated zero numfds */ - if(repeats > 1) { - WAITMS(100); /* sleep 100 milliseconds */ - } + switch(rc) { + case -1: + /* select error */ + still_running = 0; + printf("select() returns error, this is badness\n"); + break; + case 0: + default: + /* timeout or readable/writable sockets */ + curl_multi_perform(multi_handle, &still_running); + break; } - else - repeats = 0; - - curl_multi_perform(multi_handle, &still_running); } while(still_running); curl_multi_remove_handle(multi_handle, http_handle); diff --git a/docs/examples/multi-uv.c b/docs/examples/multi-uv.c index 0c0f8a2..57d712f 100644 --- a/docs/examples/multi-uv.c +++ b/docs/examples/multi-uv.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -64,13 +64,13 @@ curl_context_t* create_curl_context(curl_socket_t sockfd) void curl_close_cb(uv_handle_t *handle) { - curl_context_t *context = (curl_context_t *) handle->data; + curl_context_t* context = (curl_context_t*) handle->data; free(context); } void destroy_curl_context(curl_context_t *context) { - uv_close((uv_handle_t *) &context->poll_handle, curl_close_cb); + uv_close((uv_handle_t*) &context->poll_handle, curl_close_cb); } @@ -83,49 +83,18 @@ void add_download(const char *url, int num) sprintf(filename, "%d.download", num); file = fopen(filename, "w"); - if(!file) { + if (file == NULL) { fprintf(stderr, "Error opening %s\n", filename); return; } handle = curl_easy_init(); curl_easy_setopt(handle, CURLOPT_WRITEDATA, file); - curl_easy_setopt(handle, CURLOPT_PRIVATE, file); curl_easy_setopt(handle, CURLOPT_URL, url); curl_multi_add_handle(curl_handle, handle); fprintf(stderr, "Added download %s -> %s\n", url, filename); } -static void check_multi_info(void) -{ - int running_handles; - char *done_url; - CURLMsg *message; - int pending; - FILE *file; - - while((message = curl_multi_info_read(curl_handle, &pending))) { - switch(message->msg) { - case CURLMSG_DONE: - curl_easy_getinfo(message->easy_handle, CURLINFO_EFFECTIVE_URL, - &done_url); - curl_easy_getinfo(message->easy_handle, CURLINFO_PRIVATE, &file); - printf("%s DONE\n", done_url); - - curl_multi_remove_handle(curl_handle, message->easy_handle); - curl_easy_cleanup(message->easy_handle); - if(file) { - fclose(file); - } - break; - - default: - fprintf(stderr, "CURLMSG default\n"); - break; - } - } -} - void curl_perform(uv_poll_t *req, int status, int events) { int running_handles; @@ -137,17 +106,32 @@ void curl_perform(uv_poll_t *req, int status, int events) uv_timer_stop(&timeout); - if(events & UV_READABLE) + if (events & UV_READABLE) flags |= CURL_CSELECT_IN; - if(events & UV_WRITABLE) + if (events & UV_WRITABLE) flags |= CURL_CSELECT_OUT; - context = (curl_context_t *) req; + context = (curl_context_t*)req; curl_multi_socket_action(curl_handle, context->sockfd, flags, &running_handles); - check_multi_info(); + while ((message = curl_multi_info_read(curl_handle, &pending))) { + switch (message->msg) { + case CURLMSG_DONE: + curl_easy_getinfo(message->easy_handle, CURLINFO_EFFECTIVE_URL, + &done_url); + printf("%s DONE\n", done_url); + + curl_multi_remove_handle(curl_handle, message->easy_handle); + curl_easy_cleanup(message->easy_handle); + + break; + default: + fprintf(stderr, "CURLMSG default\n"); + abort(); + } + } } void on_timeout(uv_timer_t *req, int status) @@ -155,12 +139,11 @@ void on_timeout(uv_timer_t *req, int status) int running_handles; curl_multi_socket_action(curl_handle, CURL_SOCKET_TIMEOUT, 0, &running_handles); - check_multi_info(); } void start_timeout(CURLM *multi, long timeout_ms, void *userp) { - if(timeout_ms <= 0) + if (timeout_ms <= 0) timeout_ms = 1; /* 0 means directly call socket_action, but we'll do it in a bit */ uv_timer_start(&timeout, on_timeout, timeout_ms, 0); @@ -170,9 +153,9 @@ int handle_socket(CURL *easy, curl_socket_t s, int action, void *userp, void *socketp) { curl_context_t *curl_context; - if(action == CURL_POLL_IN || action == CURL_POLL_OUT) { - if(socketp) { - curl_context = (curl_context_t *) socketp; + if (action == CURL_POLL_IN || action == CURL_POLL_OUT) { + if (socketp) { + curl_context = (curl_context_t*) socketp; } else { curl_context = create_curl_context(s); @@ -180,7 +163,7 @@ int handle_socket(CURL *easy, curl_socket_t s, int action, void *userp, curl_multi_assign(curl_handle, s, (void *) curl_context); } - switch(action) { + switch (action) { case CURL_POLL_IN: uv_poll_start(&curl_context->poll_handle, UV_READABLE, curl_perform); break; @@ -188,7 +171,7 @@ int handle_socket(CURL *easy, curl_socket_t s, int action, void *userp, uv_poll_start(&curl_context->poll_handle, UV_WRITABLE, curl_perform); break; case CURL_POLL_REMOVE: - if(socketp) { + if (socketp) { uv_poll_stop(&((curl_context_t*)socketp)->poll_handle); destroy_curl_context((curl_context_t*) socketp); curl_multi_assign(curl_handle, s, NULL); @@ -205,10 +188,10 @@ int main(int argc, char **argv) { loop = uv_default_loop(); - if(argc <= 1) + if (argc <= 1) return 0; - if(curl_global_init(CURL_GLOBAL_ALL)) { + if (curl_global_init(CURL_GLOBAL_ALL)) { fprintf(stderr, "Could not init cURL\n"); return 1; } @@ -219,12 +202,11 @@ int main(int argc, char **argv) curl_multi_setopt(curl_handle, CURLMOPT_SOCKETFUNCTION, handle_socket); curl_multi_setopt(curl_handle, CURLMOPT_TIMERFUNCTION, start_timeout); - while(argc-- > 1) { + while (argc-- > 1) { add_download(argv[argc], argc); } uv_run(loop, UV_RUN_DEFAULT); curl_multi_cleanup(curl_handle); - return 0; } diff --git a/docs/examples/pop3-multi.c b/docs/examples/pop3-multi.c index 4353086..d14d115 100644 --- a/docs/examples/pop3-multi.c +++ b/docs/examples/pop3-multi.c @@ -88,7 +88,6 @@ int main(void) fd_set fdexcep; int maxfd = -1; int rc; - CURLMcode mc; /* curl_multi_fdset() return code */ long curl_timeo = -1; @@ -110,36 +109,15 @@ int main(void) timeout.tv_usec = (curl_timeo % 1000) * 1000; } - /* get file descriptors from the transfers */ - mc = curl_multi_fdset(mcurl, &fdread, &fdwrite, &fdexcep, &maxfd); + /* Get file descriptors from the transfers */ + curl_multi_fdset(mcurl, &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); - } + /* In a real-world program you OF COURSE check the return code of the + function calls. On success, the value of maxfd is guaranteed to be + greater or equal than -1. We call select(maxfd + 1, ...), specially in + case of (maxfd == -1), we call select(0, ...), which is basically equal + to sleep. */ + rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout); if(tvdiff(tvnow(), mp_start) > MULTI_PERFORM_HANG_TIMEOUT) { fprintf(stderr, diff --git a/docs/examples/sepheaders.c b/docs/examples/sepheaders.c index 7402e35..63ea993 100644 --- a/docs/examples/sepheaders.c +++ b/docs/examples/sepheaders.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2011, Daniel Stenberg, , 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,26 +53,23 @@ int main(void) /* send all data to this function */ curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, write_data); - /* open the header file */ - headerfile = fopen(headerfilename, "wb"); - if(!headerfile) { + /* open the files */ + headerfile = fopen(headerfilename,"wb"); + if (headerfile == NULL) { curl_easy_cleanup(curl_handle); return -1; } - - /* open the body file */ - bodyfile = fopen(bodyfilename, "wb"); - if(!bodyfile) { + bodyfile = fopen(bodyfilename,"wb"); + if (bodyfile == NULL) { curl_easy_cleanup(curl_handle); - fclose(headerfile); return -1; } /* we want the headers be written to this file handle */ - curl_easy_setopt(curl_handle, CURLOPT_HEADERDATA, headerfile); + curl_easy_setopt(curl_handle, CURLOPT_HEADERDATA, headerfile); /* we want the body be written to this file handle instead of stdout */ - curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, bodyfile); + curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, bodyfile); /* get it! */ curl_easy_perform(curl_handle); diff --git a/docs/examples/smtp-multi.c b/docs/examples/smtp-multi.c index 4098c7d..7f3d333 100644 --- a/docs/examples/smtp-multi.c +++ b/docs/examples/smtp-multi.c @@ -155,7 +155,6 @@ int main(void) fd_set fdexcep; int maxfd = -1; int rc; - CURLMcode mc; /* curl_multi_fdset() return code */ long curl_timeo = -1; @@ -177,36 +176,15 @@ int main(void) timeout.tv_usec = (curl_timeo % 1000) * 1000; } - /* get file descriptors from the transfers */ - mc = curl_multi_fdset(mcurl, &fdread, &fdwrite, &fdexcep, &maxfd); + /* Get file descriptors from the transfers */ + curl_multi_fdset(mcurl, &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); - } + /* In a real-world program you OF COURSE check the return code of the + function calls. On success, the value of maxfd is guaranteed to be + greater or equal than -1. We call select(maxfd + 1, ...), specially in + case of (maxfd == -1), we call select(0, ...), which is basically equal + to sleep. */ + rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); if(tvdiff(tvnow(), mp_start) > MULTI_PERFORM_HANG_TIMEOUT) { fprintf(stderr, diff --git a/docs/examples/synctime.c b/docs/examples/synctime.c index cd7d073..14d77de 100644 --- a/docs/examples/synctime.c +++ b/docs/examples/synctime.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -92,8 +92,6 @@ #define MAX_STRING 256 #define MAX_STRING1 MAX_STRING+1 -#define SYNCTIME_UA "synctime/1.0" - typedef struct { char http_proxy[MAX_STRING1]; @@ -101,11 +99,12 @@ typedef struct char timeserver[MAX_STRING1]; } conf_t; -const char DefaultTimeServer[3][MAX_STRING1] = +const char DefaultTimeServer[4][MAX_STRING1] = { - "http://pool.ntp.org/", - "http://nist.time.gov/", - "http://www.google.com/" + "http://nist.time.gov/timezone.cgi?UTC/s/0", + "http://www.google.com/", + "http://www.worldtimeserver.com/current_time_in_UTC.aspx", + "http://www.worldtime.com/cgi-bin/wt.cgi" }; const char *DayStr[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}; @@ -187,9 +186,9 @@ void SyncTime_CURL_Init(CURL *curl, char *proxy_port, if (strlen(proxy_user_password) > 0) curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, proxy_user_password); -#ifdef SYNCTIME_UA - curl_easy_setopt(curl, CURLOPT_USERAGENT, SYNCTIME_UA); -#endif + /* Trick Webserver by claiming that you are using Microsoft WinXP SP2, IE6 */ + curl_easy_setopt(curl, CURLOPT_USERAGENT, + "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, *SyncTime_CURL_WriteOutput); curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, *SyncTime_CURL_WriteHeader); } diff --git a/docs/libcurl/ABI b/docs/libcurl/ABI index ef0caa6..3ec0e04 100644 --- a/docs/libcurl/ABI +++ b/docs/libcurl/ABI @@ -7,16 +7,16 @@ libcurl's binary interface ABI - Application Binary Interface ----------------------------------- - "ABI" describes the low-level interface between an application program and a - library. Calling conventions, function arguments, return values, struct - sizes/defines and more. + First, allow me to define the word for this context: ABI describes the + low-level interface between an application program and a library. Calling + conventions, function arguments, return values, struct sizes/defines and + more. - [Wikipedia has a longer description](http://en.wikipedia.org/wiki/Application_binary_interface) + For a longer description, see + http://en.wikipedia.org/wiki/Application_binary_interface Upgrades --------- In the vast majority of all cases, a typical libcurl upgrade does not break the ABI at all. Your application can remain using libcurl just as before, @@ -26,13 +26,11 @@ Upgrades it now is defined to work. Version Numbers ---------------- In libcurl land, you really can't tell by the libcurl version number if that libcurl is binary compatible or not with another libcurl version. Soname Bumps ------------- Whenever there are changes done to the library that will cause an ABI breakage, that may require your application to get attention or possibly be @@ -45,11 +43,7 @@ Soname Bumps During the first seven years of libcurl releases, there have only been four ABI breakages. - We are determined to bump the SONAME as rarely as possible. Ideally, we - never do it again. - Downgrades ----------- Going to an older libcurl version from one you're currently using can be a tricky thing. Mostly we add features and options to newer libcurls as that @@ -60,7 +54,6 @@ Downgrades soname, and then your application may need to adapt to the modified ABI. History -------- The previous major library soname number bumps (breaking backwards compatibility) have happened the following times: diff --git a/docs/libcurl/curl_easy_cleanup.3 b/docs/libcurl/curl_easy_cleanup.3 index 403bfd3..d8a3f9f 100644 --- a/docs/libcurl/curl_easy_cleanup.3 +++ b/docs/libcurl/curl_easy_cleanup.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, , 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,20 +22,20 @@ .\" .TH curl_easy_cleanup 3 "22 aug 2007" "libcurl 7.17.0" "libcurl Manual" .SH NAME -curl_easy_cleanup - End a libcurl easy handle +curl_easy_cleanup - End a libcurl easy session .SH SYNOPSIS .B #include .BI "void curl_easy_cleanup(CURL *" handle ");" + .SH DESCRIPTION This function must be the last function to call for an easy session. It is the opposite of the \fIcurl_easy_init(3)\fP function and must be called with the -same \fIhandle\fP as input that a \fIcurl_easy_init(3)\fP call returned. +same \fIhandle\fP as input that the curl_easy_init call returned. -This might close all connections this handle has used and possibly has kept -open until now - unless it was attached to a multi handle while doing the -transfers. Don't call this function if you intend to transfer more files, -re-using handles is a key to good performance with libcurl. +This will effectively close all connections this handle has used and possibly +has kept open until now. Don't call this function if you intend to transfer +more files. Occasionally you may get your progress callback or header callback called from within \fIcurl_easy_cleanup(3)\fP (if previously set for the handle using @@ -43,25 +43,15 @@ within \fIcurl_easy_cleanup(3)\fP (if previously set for the handle using connection and the protocol is of a kind that requires a command/response sequence before disconnect. Examples of such protocols are FTP, POP3 and IMAP. -Any use of the \fBhandle\fP after this function has been called and have -returned, is illegal. \fIcurl_easy_cleanup(3)\fP kills the handle and all -memory associated with it! +Any uses of the \fBhandle\fP after this function has been called and have +returned, are illegal. This kills the handle and all memory associated with +it! -For libcurl versions before 7.17,: after you've called this function, you can -safely remove all the strings you've previously told libcurl to use, as it -won't use them anymore now. +With libcurl versions prior to 7.17.: when you've called this, you can safely +remove all the strings you've previously told libcurl to use, as it won't use +them anymore now. .SH RETURN VALUE None -.SH EXAMPLE -.nf -CURL *curl = curl_easy_init(); -if(curl) { - CURLcode res; - curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); - res = curl_easy_perform(curl); - curl_easy_cleanup(curl); -} -.fi .SH "SEE ALSO" .BR curl_easy_init "(3), " diff --git a/docs/libcurl/curl_easy_duphandle.3 b/docs/libcurl/curl_easy_duphandle.3 index 080723a..e53ced4 100644 --- a/docs/libcurl/curl_easy_duphandle.3 +++ b/docs/libcurl/curl_easy_duphandle.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, , 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 curl_easy_duphandle 3 "19 Sep 2014" "libcurl" "libcurl Manual" +.TH curl_easy_duphandle 3 "18 September 2001" "libcurl 7.9" "libcurl Manual" .SH NAME curl_easy_duphandle - Clone a libcurl session handle .SH SYNOPSIS @@ -47,4 +47,5 @@ in a synchronous way, the input handle may not be in use when cloned. If this function returns NULL, something went wrong and no valid handle was returned. .SH "SEE ALSO" -.BR curl_easy_init "(3)," curl_easy_cleanup "(3)," curl_global_init "(3)" +.BR curl_easy_init "(3)," curl_easy_cleanup "(3)," curl_global_init "(3) + diff --git a/docs/libcurl/curl_easy_escape.3 b/docs/libcurl/curl_easy_escape.3 index 7c8c658..3a98e6f 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 - 2011, Daniel Stenberg, , 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,13 +26,13 @@ curl_easy_escape - URL encodes the given string .SH SYNOPSIS .B #include .sp -.BI "char *curl_easy_escape( CURL *" curl ", char *" string ", int "length " );" +.BI "char *curl_easy_escape( CURL *" curl ", char *" url ", int "length " );" .ad .SH DESCRIPTION -This function converts the given input \fBstring\fP to an URL encoded string -and returns that as a new allocated string. All input characters that are not -a-z, A-Z, 0-9, '-', '.', '_' or '~' are converted to their "URL escaped" -version (%NN where NN is a two-digit hexadecimal number). +This function converts the given input string to an URL encoded string and +returns that as a new allocated string. All input characters that are not a-z, +A-Z, 0-9, '-', '.', '_' or '~' are converted to their "URL escaped" version +(%NN where NN is a two-digit hexadecimal number). If the \fBlength\fP argument is set to 0 (zero), \fIcurl_easy_escape(3)\fP uses strlen() on the input \fBurl\fP to find out the size. @@ -42,16 +42,5 @@ You must \fIcurl_free(3)\fP the returned string when you're done with it. Added in 7.15.4 and replaces the old \fIcurl_escape(3)\fP function. .SH RETURN VALUE A pointer to a zero terminated string or NULL if it failed. -.SH EXAMPLE -.nf -CURL *curl = curl_easy_init(); -if(curl) { - char *output = curl_easy_escape(curl, "data to convert", 15); - if(output) { - printf("Encoded: %s\n", output); - curl_free(output); - } -}} -.fi .SH "SEE ALSO" -.BR curl_easy_unescape "(3), " curl_free "(3), " RFC 3986 +.BR curl_easy_unescape "(3), " curl_free "(3), " RFC 2396 diff --git a/docs/libcurl/curl_easy_getinfo.3 b/docs/libcurl/curl_easy_getinfo.3 index 0f0fd2e..7b7aee6 100644 --- a/docs/libcurl/curl_easy_getinfo.3 +++ b/docs/libcurl/curl_easy_getinfo.3 @@ -76,8 +76,8 @@ start until the connect to the remote host (or proxy) was completed. Pass a pointer to a double to receive the time, in seconds, it took from the start until the SSL/SSH connect/handshake to the remote host was completed. This time is most often very near to the PRETRANSFER time, except for cases -such as HTTP pipelining where the pretransfer time can be delayed due to waits -in line for the pipeline and more. (Added in 7.19.0) +such as HTTP pippelining where the pretransfer time can be delayed due to +waits in line for the pipeline and more. (Added in 7.19.0) .IP CURLINFO_PRETRANSFER_TIME Pass a pointer to a double to receive the time, in seconds, it took from the start until the file transfer is just about to begin. This includes all @@ -222,13 +222,13 @@ request was done. The struct reports how many certs it found and then you can extract info for each of those certs by following the linked lists. The info chain is provided in a series of data in the format "name:content" where the content is for the specific named data. See also the certinfo.c example. NOTE: -this option is only available in libcurl built with OpenSSL, NSS or GSKit -support. (Added in 7.19.1) +this option is only available in libcurl built with OpenSSL, NSS, GSKit or +QsoSSL support. (Added in 7.19.1) .IP CURLINFO_TLS_SESSION -Pass a pointer to a 'struct curl_tlssessioninfo *'. The pointer will be -initialized to refer to a 'struct curl_tlssessioninfo *' that will contain an -enum indicating the SSL library used for the handshake and the respective -internal TLS session structure of this underlying SSL library. +Pass a pointer to a 'struct curl_tlsinfo *'. The pointer will be initialized +to refer to a 'struct curl_tlsinfo *' that will contain an enum indicating the +SSL library used for the handshake and the respective internal TLS session +structure of this underlying SSL library. This may then be used to extract certificate information in a format convenient for further processing, such as manual validation. NOTE: this diff --git a/docs/libcurl/curl_easy_init.3 b/docs/libcurl/curl_easy_init.3 index 4f7f004..837ba32 100644 --- a/docs/libcurl/curl_easy_init.3 +++ b/docs/libcurl/curl_easy_init.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, , 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,34 +26,26 @@ curl_easy_init - Start a libcurl easy session .B #include .BI "CURL *curl_easy_init( );" + .SH DESCRIPTION This function must be the first function to call, and it returns a CURL easy -handle that you must use as input to other functions in the easy -interface. This call \fBMUST\fP have a corresponding call to +handle that you must use as input to other easy-functions. curl_easy_init +initializes curl and this call \fBMUST\fP have a corresponding call to \fIcurl_easy_cleanup(3)\fP when the operation is complete. -If you did not already call \fIcurl_global_init(3)\fP, \fIcurl_easy_init(3)\fP -does it automatically. This may be lethal in multi-threaded cases, since -\fIcurl_global_init(3)\fP is not thread-safe, and it may result in resource -problems because there is no corresponding cleanup. +If you did not already call \fIcurl_global_init(3)\fP, +\fIcurl_easy_init(3)\fP does it automatically. +This may be lethal in multi-threaded cases, since \fIcurl_global_init(3)\fP is +not thread-safe, and it may result in resource problems because there is +no corresponding cleanup. + +You are strongly advised to not allow this automatic behaviour, by +calling \fIcurl_global_init(3)\fP yourself properly. +See the description in \fBlibcurl\fP(3) of global environment +requirements for details of how to use this function. -You are strongly advised to not allow this automatic behaviour, by calling -\fIcurl_global_init(3)\fP yourself properly. See the description in -\fBlibcurl\fP(3) of global environment requirements for details of how to use -this function. .SH RETURN VALUE If this function returns NULL, something went wrong and you cannot use the other curl functions. -.SH EXAMPLE -.nf -CURL *curl = curl_easy_init(); -if(curl) { - CURLcode res; - curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); - res = curl_easy_perform(curl); - curl_easy_cleanup(curl); -} -.fi .SH "SEE ALSO" -.BR curl_easy_cleanup "(3), " curl_global_init "(3), " curl_easy_reset "(3), " -.BR curl_easy_perform "(3) " +.BR curl_easy_cleanup "(3), " curl_global_init "(3), " curl_easy_reset "(3)" diff --git a/docs/libcurl/curl_easy_pause.3 b/docs/libcurl/curl_easy_pause.3 index 0f6ad5a..d841295 100644 --- a/docs/libcurl/curl_easy_pause.3 +++ b/docs/libcurl/curl_easy_pause.3 @@ -40,8 +40,9 @@ the writing is later unpaused. While it may feel tempting, take care and notice that you cannot call this function from another thread. To unpause, you may for example call it from the -progress callback (\fICURLOPT_PROGRESSFUNCTION(3)\fP), which gets called at -least once per second, even if the connection is paused. +progress callback (see \fIcurl_easy_setopt(3)\fP's +\fICURLOPT_PROGRESSFUNCTION(3)\fP), which gets called at least once per +second, even if the connection is paused. When this function is called to unpause reading, the chance is high that you will get your write callback called before this function returns. diff --git a/docs/libcurl/curl_easy_perform.3 b/docs/libcurl/curl_easy_perform.3 index e40c1e4..5283015 100644 --- a/docs/libcurl/curl_easy_perform.3 +++ b/docs/libcurl/curl_easy_perform.3 @@ -21,7 +21,7 @@ .\" ************************************************************************** .TH curl_easy_perform 3 "5 Mar 2001" "libcurl 7.7" "libcurl Manual" .SH NAME -curl_easy_perform - perform a blocking file transfer +curl_easy_perform - Perform a file transfer .SH SYNOPSIS .B #include .sp @@ -58,16 +58,6 @@ CURLE_OK (0) means everything was ok, non-zero means an error occurred as defines - see \fIlibcurl-errors(3)\fP. If the \fBCURLOPT_ERRORBUFFER(3)\fP was set with \fIcurl_easy_setopt(3)\fP there will be a readable error message in the error buffer when non-zero is returned. -.SH EXAMPLE -.nf -CURL *curl = curl_easy_init(); -if(curl) { - CURLcode res; - curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); - res = curl_easy_perform(curl); - curl_easy_cleanup(curl); -}} -.fi .SH "SEE ALSO" .BR curl_easy_init "(3), " curl_easy_setopt "(3), " .BR curl_multi_add_handle "(3), " curl_multi_perform "(3), " diff --git a/docs/libcurl/curl_easy_reset.3 b/docs/libcurl/curl_easy_reset.3 index cb69bdd..592d3ed 100644 --- a/docs/libcurl/curl_easy_reset.3 +++ b/docs/libcurl/curl_easy_reset.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -39,6 +39,5 @@ This function was added in libcurl 7.12.1 .SH RETURN VALUE Nothing .SH "SEE ALSO" -.BR curl_easy_init "(3)," curl_easy_cleanup "(3)," curl_easy_setopt "(3)," -.BR curl_easy_duphandle "(3)" +.BR curl_easy_init "(3)," curl_easy_cleanup "(3)," curl_easy_setopt "(3) diff --git a/docs/libcurl/curl_easy_setopt.3 b/docs/libcurl/curl_easy_setopt.3 index ecfa38f..17871dd 100644 --- a/docs/libcurl/curl_easy_setopt.3 +++ b/docs/libcurl/curl_easy_setopt.3 @@ -28,14 +28,14 @@ curl_easy_setopt \- set options for a curl easy handle CURLcode curl_easy_setopt(CURL *handle, CURLoption option, parameter); .SH DESCRIPTION -\fIcurl_easy_setopt(3)\fP is used to tell libcurl how to behave. By setting -the appropriate options, the application can change libcurl's behavior. All -options are set with an \fIoption\fP followed by a \fIparameter\fP. That -parameter can be a \fBlong\fP, a \fBfunction pointer\fP, an \fBobject -pointer\fP or a \fBcurl_off_t\fP, depending on what the specific option -expects. Read this manual carefully as bad input values may cause libcurl to -behave badly! You can only set one option in each function call. A typical -application uses many \fIcurl_easy_setopt(3)\fP calls in the setup phase. +curl_easy_setopt() is used to tell libcurl how to behave. By using the +appropriate options to \fIcurl_easy_setopt\fP, you can change libcurl's +behavior. All options are set with the \fIoption\fP followed by a +\fIparameter\fP. That parameter can be a \fBlong\fP, a \fBfunction pointer\fP, +an \fBobject pointer\fP or a \fBcurl_off_t\fP, depending on what the specific +option expects. Read this manual carefully as bad input values may cause +libcurl to behave badly! You can only set one option in each function call. A +typical application uses many curl_easy_setopt() calls in the setup phase. Options set with this function call are valid for all forthcoming transfers performed using this \fIhandle\fP. The options are not in any way reset @@ -45,8 +45,8 @@ options back to internal default with \fIcurl_easy_reset(3)\fP. Strings passed to libcurl as 'char *' arguments, are copied by the library; thus the string storage associated to the pointer argument may be overwritten -after \fIcurl_easy_setopt(3)\fP returns. The only exception to this rule is -really \fICURLOPT_POSTFIELDS(3)\fP, but the alternative that copies the string +after curl_easy_setopt() returns. The only exception to this rule is really +\fICURLOPT_POSTFIELDS(3)\fP, but the alternative that copies the string \fICURLOPT_COPYPOSTFIELDS(3)\fP has some usage characteristics you need to read up on. @@ -78,7 +78,7 @@ Data pointer to pass to the read callback. See \fICURLOPT_READDATA(3)\fP .IP CURLOPT_IOCTLFUNCTION Callback for I/O operations. See \fICURLOPT_IOCTLFUNCTION(3)\fP .IP CURLOPT_IOCTLDATA -Data pointer to pass to the I/O callback. See \fICURLOPT_IOCTLDATA(3)\fP +Data pointer to pass to the i/o callback. See \fICURLOPT_IOCTLDATA(3)\fP .IP CURLOPT_SEEKFUNCTION Callback for seek operations. See \fICURLOPT_SEEKFUNCTION(3)\fP .IP CURLOPT_SEEKDATA @@ -112,9 +112,9 @@ Callback for debug information. See \fICURLOPT_DEBUGFUNCTION(3)\fP .IP CURLOPT_DEBUGDATA Data pointer to pass to the debug callback. See \fICURLOPT_DEBUGDATA(3)\fP .IP CURLOPT_SSL_CTX_FUNCTION -Callback for SSL context logic. See \fICURLOPT_SSL_CTX_FUNCTION(3)\fP +Callback for SSL CTX logic. See \fICURLOPT_SSL_CTX_FUNCTION(3)\fP .IP CURLOPT_SSL_CTX_DATA -Data pointer to pass to the SSL context callback. See \fICURLOPT_SSL_CTX_DATA(3)\fP +Data pointer to pass to the ssl context callback. See \fICURLOPT_SSL_CTX_DATA(3)\fP .IP CURLOPT_CONV_TO_NETWORK_FUNCTION Callback for code base conversion. See \fICURLOPT_CONV_TO_NETWORK_FUNCTION(3)\fP .IP CURLOPT_CONV_FROM_NETWORK_FUNCTION @@ -124,7 +124,7 @@ Callback for code base conversion. See \fICURLOPT_CONV_FROM_UTF8_FUNCTION(3)\fP .IP CURLOPT_INTERLEAVEFUNCTION Callback for RTSP interleaved data. See \fICURLOPT_INTERLEAVEFUNCTION(3)\fP .IP CURLOPT_INTERLEAVEDATA -Data pointer to pass to the RTSP interleave callback. See \fICURLOPT_INTERLEAVEDATA(3)\fP +Data pointer to pass to the interleave callback. See \fICURLOPT_INTERLEAVEDATA(3)\fP .IP CURLOPT_CHUNK_BGN_FUNCTION Callback for wildcard download start of chunk. See \fICURLOPT_CHUNK_BGN_FUNCTION(3)\fP .IP CURLOPT_CHUNK_END_FUNCTION @@ -134,7 +134,7 @@ Data pointer to pass to the chunk callbacks. See \fICURLOPT_CHUNK_DATA(3)\fP .IP CURLOPT_FNMATCH_FUNCTION 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 +Data pointer to pass to the fnmatch callback. See \fICURLOPT_FNMATCH_DATA(3)\fP .SH ERROR OPTIONS .IP CURLOPT_ERRORBUFFER Error message buffer. See \fICURLOPT_ERRORBUFFER(3)\fP @@ -160,9 +160,9 @@ Filter out hosts from proxy use. \fICURLOPT_NOPROXY(3)\fP .IP CURLOPT_HTTPPROXYTUNNEL Tunnel through the HTTP proxy. \fICURLOPT_HTTPPROXYTUNNEL(3)\fP .IP CURLOPT_SOCKS5_GSSAPI_SERVICE -Socks5 GSSAPI service name. \fICURLOPT_SOCKS5_GSSAPI_SERVICE(3)\fP +Socks5 gassapi service name. \fICURLOPT_SOCKS5_GSSAPI_SERVICE(3)\fP .IP CURLOPT_SOCKS5_GSSAPI_NEC -Socks5 GSSAPI NEC mode. See \fICURLOPT_SOCKS5_GSSAPI_NEC(3)\fP +Socks5 gssapi NEC mode. See \fICURLOPT_SOCKS5_GSSAPI_NEC(3)\fP .IP CURLOPT_INTERFACE Bind connection locally to this. See \fICURLOPT_INTERFACE(3)\fP .IP CURLOPT_LOCALPORT @@ -187,19 +187,17 @@ Enable TCP keep-alive. See \fICURLOPT_TCP_KEEPALIVE(3)\fP Idle time before sending keep-alive. See \fICURLOPT_TCP_KEEPIDLE(3)\fP .IP CURLOPT_TCP_KEEPINTVL Interval between keep-alive probes. See \fICURLOPT_TCP_KEEPINTVL(3)\fP -.IP CURLOPT_UNIX_SOCKET_PATH -Path to a Unix domain socket. See \fICURLOPT_UNIX_SOCKET_PATH(3)\fP .SH NAMES and PASSWORDS OPTIONS (Authentication) .IP CURLOPT_NETRC Enable .netrc parsing. See \fICURLOPT_NETRC(3)\fP .IP CURLOPT_NETRC_FILE \&.netrc file name. See \fICURLOPT_NETRC_FILE(3)\fP .IP CURLOPT_USERPWD -User name and password. See \fICURLOPT_USERPWD(3)\fP +User and password. See \fICURLOPT_USERPWD(3)\fP .IP CURLOPT_PROXYUSERPWD -Proxy user name and password. See \fICURLOPT_PROXYUSERPWD(3)\fP +Proxy user and password. See \fICURLOPT_PROXYUSERPWD(3)\fP .IP CURLOPT_USERNAME -User name. See \fICURLOPT_USERNAME(3)\fP +Username. See \fICURLOPT_USERNAME(3)\fP .IP CURLOPT_PASSWORD Password. See \fICURLOPT_PASSWORD(3)\fP .IP CURLOPT_LOGIN_OPTIONS @@ -219,7 +217,7 @@ HTTP proxy authentication methods. See \fICURLOPT_PROXYAUTH(3)\fP .IP CURLOPT_SASL_IR Enable SASL initial response. See \fICURLOPT_SASL_IR(3)\fP .IP CURLOPT_XOAUTH2_BEARER -OAuth2 bearer token. See \fICURLOPT_XOAUTH2_BEARER(3)\fP +XOAuth2 bearer token. See \fICURLOPT_XOAUTH2_BEARER(3)\fP .SH HTTP OPTIONS .IP CURLOPT_AUTOREFERER Automatically set Referer: header. See \fICURLOPT_AUTOREFERER(3)\fP @@ -230,7 +228,7 @@ Request Transfer-Encoding. See \fICURLOPT_TRANSFER_ENCODING(3)\fP .IP CURLOPT_FOLLOWLOCATION Follow HTTP redirects. See \fICURLOPT_FOLLOWLOCATION(3)\fP .IP CURLOPT_UNRESTRICTED_AUTH -Do not restrict authentication to original host. \fICURLOPT_UNRESTRICTED_AUTH(3)\fP +Do not restrict auth to original host. \fICURLOPT_UNRESTRICTED_AUTH(3)\fP .IP CURLOPT_MAXREDIRS Maximum number of redirects to follow. See \fICURLOPT_MAXREDIRS(3)\fP .IP CURLOPT_POSTREDIR @@ -302,6 +300,8 @@ Commands to run before transfer. See \fICURLOPT_QUOTE(3)\fP Commands to run after transfer. See \fICURLOPT_POSTQUOTE(3)\fP .IP CURLOPT_PREQUOTE Commands to run just before transfer. See \fICURLOPT_PREQUOTE(3)\fP +.IP CURLOPT_DIRLISTONLY +List only. See \fICURLOPT_DIRLISTONLY(3)\fP .IP CURLOPT_APPEND Append to remote file. See \fICURLOPT_APPEND(3)\fP .IP CURLOPT_FTP_USE_EPRT @@ -311,7 +311,7 @@ Use EPSV. See \fICURLOPT_FTP_USE_EPSV(3)\fP .IP CURLOPT_FTP_USE_PRET Use PRET. See \fICURLOPT_FTP_USE_PRET(3)\fP .IP CURLOPT_FTP_CREATE_MISSING_DIRS -Create missing directories on the remote server. See \fICURLOPT_FTP_CREATE_MISSING_DIRS(3)\fP +Create missing dirs on the remote server. See \fICURLOPT_FTP_CREATE_MISSING_DIRS(3)\fP .IP CURLOPT_FTP_RESPONSE_TIMEOUT Timeout for FTP responses. See \fICURLOPT_FTP_RESPONSE_TIMEOUT(3)\fP .IP CURLOPT_FTP_ALTERNATIVE_TO_USER @@ -356,8 +356,6 @@ Resume a transfer. See \fICURLOPT_RESUME_FROM_LARGE(3)\fP Custom request/method. See \fICURLOPT_CUSTOMREQUEST(3)\fP .IP CURLOPT_FILETIME Request file modification date and time. See \fICURLOPT_FILETIME(3)\fP -.IP CURLOPT_DIRLISTONLY -List only. See \fICURLOPT_DIRLISTONLY(3)\fP .IP CURLOPT_NOBODY Do not get the body contents. See \fICURLOPT_NOBODY(3)\fP .IP CURLOPT_INFILESIZE @@ -384,11 +382,11 @@ Low speed limit to abort transfer. See \fICURLOPT_LOW_SPEED_LIMIT(3)\fP .IP CURLOPT_LOW_SPEED_TIME Time to be below the speed to trigger low speed abort. See \fICURLOPT_LOW_SPEED_TIME(3)\fP .IP CURLOPT_MAX_SEND_SPEED_LARGE -Cap the upload speed to this. See \fICURLOPT_MAX_SEND_SPEED_LARGE(3)\fP +Cap upload speed to this. See \fICURLOPT_MAX_SEND_SPEED_LARGE(3)\fP .IP CURLOPT_MAX_RECV_SPEED_LARGE -Cap the download speed to this. See \fICURLOPT_MAX_RECV_SPEED_LARGE(3)\fP +Cap download speed to this. See \fICURLOPT_MAX_RECV_SPEED_LARGE(3)\fP .IP CURLOPT_MAXCONNECTS -Maximum number of connections in the connection pool. See \fICURLOPT_MAXCONNECTS(3)\fP +Max number of connection is connection pool. See \fICURLOPT_MAXCONNECTS(3)\fP .IP CURLOPT_FRESH_CONNECT Use a new connection. \fICURLOPT_FRESH_CONNECT(3)\fP .IP CURLOPT_FORBID_REUSE @@ -427,7 +425,7 @@ Client key password. See \fICURLOPT_KEYPASSWD(3)\fP .IP CURLOPT_SSL_ENABLE_ALPN Enable use of ALPN. See \fICURLOPT_SSL_ENABLE_ALPN(3)\fP .IP CURLOPT_SSL_ENABLE_NPN -Enable use of NPN. See \fICURLOPT_SSL_ENABLE_NPN(3)\fP +)Enable use of NPN. See \fICURLOPT_SSL_ENABLE_NPN(3)\fP .IP CURLOPT_SSLENGINE Use identifier with SSL engine. See \fICURLOPT_SSLENGINE(3)\fP .IP CURLOPT_SSLENGINE_DEFAULT @@ -448,8 +446,6 @@ Certificate Revocation List. See \fICURLOPT_CRLFILE(3)\fP Verify the host name in the SSL certificate. See \fICURLOPT_SSL_VERIFYHOST(3)\fP .IP CURLOPT_CERTINFO Extract certificate info. See \fICURLOPT_CERTINFO(3)\fP -.IP CURLOPT_PINNEDPUBLICKEY -Set pinned SSL public key . See \fICURLOPT_PINNEDPUBLICKEY(3)\fP .IP CURLOPT_RANDOM_FILE Provide source for entropy random data. See \fICURLOPT_RANDOM_FILE(3)\fP .IP CURLOPT_EGDSOCKET @@ -487,7 +483,7 @@ Share object to use. See \fICURLOPT_SHARE(3)\fP .IP CURLOPT_NEW_FILE_PERMS Mode for creating new remote files. See \fICURLOPT_NEW_FILE_PERMS(3)\fP .IP CURLOPT_NEW_DIRECTORY_PERMS -Mode for creating new remote directories. See \fICURLOPT_NEW_DIRECTORY_PERMS(3)\fP +Mode for creating new remote dirs. See \fICURLOPT_NEW_DIRECTORY_PERMS(3)\fP .SH TELNET OPTIONS .IP CURLOPT_TELNETOPTIONS TELNET options. See \fICURLOPT_TELNETOPTIONS(3)\fP @@ -501,16 +497,5 @@ the library is too old to support it or the option was removed in a recent version, this function will return \fICURLE_UNKNOWN_OPTION\fP. If support for the option was disabled at compile-time, it will return \fICURLE_NOT_BUILT_IN\fP. -.SH EXAMPLE -.nf -CURL *curl = curl_easy_init(); -if(curl) { - CURLcode res; - curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); - res = curl_easy_perform(curl); - curl_easy_cleanup(curl); -}} -.fi .SH "SEE ALSO" -.BR curl_easy_init "(3), " curl_easy_cleanup "(3), " curl_easy_reset "(3), " -.BR curl_multi_setopt "(3), " +.BR curl_easy_init "(3), " curl_easy_cleanup "(3), " curl_easy_reset "(3)" diff --git a/docs/libcurl/curl_easy_strerror.3 b/docs/libcurl/curl_easy_strerror.3 index 557d467..a26c9c5 100644 --- a/docs/libcurl/curl_easy_strerror.3 +++ b/docs/libcurl/curl_easy_strerror.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * 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 @@ -27,11 +27,8 @@ curl_easy_strerror - return string describing error code const char *curl_easy_strerror(CURLcode errornum); .SH DESCRIPTION -The \fIcurl_easy_strerror(3)\fP function returns a string describing the -CURLcode error code passed in the argument \fIerrornum\fP. - -Typically applications also appreciate \fICURLOPT_ERRORBUFFER(3)\fP for more -specific error descriptions generated at run-time. +The curl_easy_strerror() function returns a string describing the CURLcode +error code passed in the argument \fIerrornum\fP. .SH AVAILABILITY This function was added in libcurl 7.12.0 .SH RETURN VALUE diff --git a/docs/libcurl/curl_formadd.3 b/docs/libcurl/curl_formadd.3 index 3e48149..b27e61d 100644 --- a/docs/libcurl/curl_formadd.3 +++ b/docs/libcurl/curl_formadd.3 @@ -86,10 +86,6 @@ you must set its length with \fBCURLFORM_CONTENTSLENGTH\fP. .IP CURLFORM_CONTENTSLENGTH followed by a long giving the length of the contents. Note that for \fICURLFORM_STREAM\fP contents, this option is mandatory. - -If you pass a 0 (zero) for this option, libcurl will instead do a strlen() on -the contents to figure out the size. If you really want to send a zero byte -content then you must make sure strlen() on the data pointer returns zero. .IP CURLFORM_FILECONTENT followed by a filename, causes that file to be read and its contents used as data in this part. This part does \fInot\fP automatically become a file diff --git a/docs/libcurl/curl_free.3 b/docs/libcurl/curl_free.3 index 9e5570f..a908808 100644 --- a/docs/libcurl/curl_free.3 +++ b/docs/libcurl/curl_free.3 @@ -29,7 +29,7 @@ curl_free - reclaim memory that has been obtained through a libcurl call .ad .SH DESCRIPTION curl_free reclaims memory that has been obtained through a libcurl call. Use -\fIcurl_free(3)\fP instead of free() to avoid anomalies that can result from +curl_free() instead of free() to avoid anomalies that can result from differences in memory management between your application and libcurl. .SH "SEE ALSO" -.BR curl_easy_unescape "(3), " curl_easy_escape "(3) " +.BR curl_unescape "(3)" diff --git a/docs/libcurl/curl_getdate.3 b/docs/libcurl/curl_getdate.3 index ff31ac7..47ae2fd 100644 --- a/docs/libcurl/curl_getdate.3 +++ b/docs/libcurl/curl_getdate.3 @@ -102,7 +102,4 @@ number). 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. -.SH "SEE ALSO" -.BR curl_easy_escape "(3), " curl_easy_unescape "(3), " -.BR CURLOPT_TIMECONDITION "(3), " CURLOPT_TIMEVALUE "(3) " +crippled mktime(), \fIcurl_getdate\fP will return -1 in this case. diff --git a/docs/libcurl/curl_global_init.3 b/docs/libcurl/curl_global_init.3 index 77172be..8e1cc18 100644 --- a/docs/libcurl/curl_global_init.3 +++ b/docs/libcurl/curl_global_init.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * 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 @@ -46,11 +46,11 @@ libcurl. \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. Because -\fIcurl_global_init(3)\fP calls functions of other libraries that are -similarly thread unsafe, it could conflict with any other thread that uses -these other libraries. +\fIcurl_global_init()\fP calls functions of other libraries that are similarly +thread unsafe, it could conflict with any other thread that uses these other +libraries. -See the description in \fBlibcurl(3)\fP of global environment requirements for +See the description in \fBlibcurl\fP(3) of global environment requirements for details of how to use this function. .SH FLAGS @@ -74,8 +74,7 @@ the functionality of the \fBCURL_GLOBAL_ALL\fP mask. .TP .B CURL_GLOBAL_ACK_EINTR When this flag is set, curl will acknowledge EINTR condition when connecting -or when waiting for data. Otherwise, curl waits until full timeout -elapses. (Added in 7.30.0) +or when waiting for data. Otherwise, curl waits until full timeout elapses. .SH RETURN VALUE If this function returns non-zero, something went wrong and you cannot use the other curl functions. diff --git a/docs/libcurl/curl_multi_add_handle.3 b/docs/libcurl/curl_multi_add_handle.3 index 253b864..31c422e 100644 --- a/docs/libcurl/curl_multi_add_handle.3 +++ b/docs/libcurl/curl_multi_add_handle.3 @@ -29,35 +29,30 @@ CURLMcode curl_multi_add_handle(CURLM *multi_handle, CURL *easy_handle); .ad .SH DESCRIPTION Adds a standard easy handle to the multi stack. This function call will make -this \fImulti_handle\fP control the specified \fIeasy_handle\fP. +this \fImulti_handle\fP control the specified \fIeasy_handle\fP. Furthermore, +libcurl now initiates the connection associated with the specified +\fIeasy_handle\fP. While an easy handle is added to a multi stack, you can not and you must not -use \fIcurl_easy_perform(3)\fP on that handle. After having removed the easy -handle from the multi stack again, it is perfectly fine to use it with the -easy interface again. +use \fIcurl_easy_perform(3)\fP on that handle. After having removed the handle +from the multi stack again, it is perfectly fine to use it with the easy +interface again. If the easy handle is not set to use a shared (\fICURLOPT_SHARE(3)\fP) or global DNS cache (\fICURLOPT_DNS_USE_GLOBAL_CACHE(3)\fP), it will be made to use the DNS cache that is shared between all easy handles within the multi handle when \fIcurl_multi_add_handle(3)\fP is called. -When an easy interface is added to a multi handle, it will use a shared -connection cache owned by the multi handle. Removing and adding new easy -handles will not affect the pool of connections or the ability to do -connection re-use. - If you have CURLMOPT_TIMERFUNCTION set in the multi handle (and you really should if you're working event-based with \fIcurl_multi_socket_action(3)\fP and friends), that callback will be called from within this function to ask for an updated timer so that your main event loop will get the activity on this handle to get started. -The easy handle will remain added to the multi handle until you remove it -again with \fIcurl_multi_remove_handle(3)\fP - even when a transfer with that -specific easy handle is completed. - -You should remove the easy handle from the multi stack before you terminate -first the easy handle and then the multi handle: +The easy handle will remain added until you remove it again with +\fIcurl_multi_remove_handle(3)\fP. You should remove the easy handle from the +multi stack before you terminate first the easy handle and then the multi +handle: 1 - \fIcurl_multi_remove_handle(3)\fP @@ -67,5 +62,4 @@ first the easy handle and then the multi handle: .SH RETURN VALUE CURLMcode type, general libcurl multi interface error code. .SH "SEE ALSO" -.BR curl_multi_cleanup "(3)," curl_multi_init "(3), " -.BR curl_multi_setopt "(3), " curl_multi_socket_action "(3) " +.BR curl_multi_cleanup "(3)," curl_multi_init "(3)" diff --git a/docs/libcurl/curl_multi_assign.3 b/docs/libcurl/curl_multi_assign.3 index 0a2378d..6c0bbae 100644 --- a/docs/libcurl/curl_multi_assign.3 +++ b/docs/libcurl/curl_multi_assign.3 @@ -21,7 +21,7 @@ .\" ************************************************************************** .TH curl_multi_assign 3 "9 Jul 2006" "libcurl 7.16.0" "libcurl Manual" .SH NAME -curl_multi_assign \- set data to associate with an internal socket +curl_multi_assign \- set data to association with an internal socket .SH SYNOPSIS #include @@ -30,7 +30,7 @@ CURLMcode curl_multi_assign(CURLM *multi_handle, curl_socket_t sockfd, .SH DESCRIPTION This function creates an association in the multi handle between the given socket and a private pointer of the application. This is designed for -\fIcurl_multi_socket_action(3)\fP uses. +\fIcurl_multi_socket(3)\fP uses. When set, the \fIsockptr\fP pointer will be passed to all future socket callbacks for the specific \fIsockfd\fP socket. diff --git a/docs/libcurl/curl_multi_fdset.3 b/docs/libcurl/curl_multi_fdset.3 index 908ef55..3dbdc45 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 - 2011, Daniel Stenberg, , 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,35 +37,23 @@ This function extracts file descriptor information from a given multi_handle. libcurl returns its fd_set sets. The application can use these to select() on, but be sure to FD_ZERO them before calling this function as \fIcurl_multi_fdset(3)\fP only adds its own descriptors, it doesn't zero or -otherwise remove any others. The \fIcurl_multi_perform(3)\fP function should -be called as soon as one of them is ready to be read from or written to. - -If the \fIread_fd_set\fP argument is not a null pointer, it points to an -object of type fd_set that on returns specifies the file descriptors to be -checked for being ready to read. - -If the \fIwrite_fd_set\fP argument is not a null pointer, it points to an -object of type fd_set that on return specifies the file descriptors to be -checked for being ready to write. - -If the \fIexc_fd_set\fP argument is not a null pointer, it points to an object -of type fd_set that on return specifies the file descriptors to be checked for -error conditions pending. +otherwise remove any others. The \fIcurl_multi_perform(3)\fP function should be +called as soon as one of them is ready to be read from or written to. If no file descriptors are set by libcurl, \fImax_fd\fP will contain -1 when -this function returns. Otherwise it will contain the highest descriptor number +this function returns. Otherwise it will contain the higher descriptor number 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. +action is completed using select(). When max_fd returns with -1, you need to +wait a while and then proceed and call \fIcurl_multi_perform\fP anyway. How +long to wait? I would suggest 100 milliseconds at least, 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 -activity has been seen on the fd_sets after the timeout expires as otherwise -internal retries and timeouts may not work as you'd think and want. +When doing select(), you should use \fBcurl_multi_timeout\fP to figure out how +long to wait for action. Call \fIcurl_multi_perform\fP even if no activity has +been seen on the fd_sets after the timeout expires as otherwise internal +retries and timeouts may not work as you'd think and want. If one of the sockets used by libcurl happens to be larger than what can be set in an fd_set, which on POSIX systems means that the file descriptor is @@ -79,5 +67,4 @@ CURLMcode type, general libcurl multi interface error code. See \fIlibcurl-errors(3)\fP .SH "SEE ALSO" .BR curl_multi_cleanup "(3), " curl_multi_init "(3), " -.BR curl_multi_wait "(3), " -.BR curl_multi_timeout "(3), " curl_multi_perform "(3), " select "(2) " +.BR curl_multi_timeout "(3), " curl_multi_perform "(3) " diff --git a/docs/libcurl/curl_multi_perform.3 b/docs/libcurl/curl_multi_perform.3 index e0e5b02..304197b 100644 --- a/docs/libcurl/curl_multi_perform.3 +++ b/docs/libcurl/curl_multi_perform.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * 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 @@ -34,7 +34,7 @@ in an non-blocking fashion. When an application has found out there's data available for the multi_handle or a timeout has elapsed, the application should call this function to read/write whatever there is to read or write right now etc. -\fIcurl_multi_perform(3)\fP returns as soon as the reads/writes are done. This +curl_multi_perform() returns as soon as the reads/writes are done. This function does not require that there actually is any data available for reading or that data can be written, it can be called just in case. It will write the number of handles that still transfer data in the second argument's @@ -53,7 +53,7 @@ there is no longer any transfers in progress. CURLMcode type, general libcurl multi interface error code. Before version 7.20.0: If you receive \fICURLM_CALL_MULTI_PERFORM\fP, this -basically means that you should call \fIcurl_multi_perform(3)\fP again, before +basically means that you should call \fIcurl_multi_perform\fP again, before you select() on more actions. You don't have to do it immediately, but the return code means that libcurl may have more data available to return or that there may be more data to send off before it is "satisfied". Do note that @@ -74,6 +74,5 @@ period, then it'll wait for action on the file descriptors using \fIcurl_multi_perform(3)\fP gets called. .SH "SEE ALSO" .BR curl_multi_cleanup "(3), " curl_multi_init "(3), " -.BR curl_multi_wait "(3), " .BR curl_multi_fdset "(3), " curl_multi_info_read "(3), " .BR libcurl-errors "(3)" diff --git a/docs/libcurl/curl_multi_remove_handle.3 b/docs/libcurl/curl_multi_remove_handle.3 index 1c2165b..ad6d2ba 100644 --- a/docs/libcurl/curl_multi_remove_handle.3 +++ b/docs/libcurl/curl_multi_remove_handle.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, , 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,17 +28,16 @@ curl_multi_remove_handle - remove an easy handle from a multi session CURLMcode curl_multi_remove_handle(CURLM *multi_handle, CURL *easy_handle); .ad .SH DESCRIPTION -Removes a given \fIeasy_handle\fI from the \fImulti_handle\fI. This will make -the specified easy handle be removed from this multi handle's control. +Removes a given easy_handle from the multi_handle. This will make the +specified easy handle be removed from this multi handle's control. When the easy handle has been removed from a multi stack, it is again -perfectly legal to invoke \fIcurl_easy_perform(3)\fP on this easy handle. +perfectly legal to invoke \fIcurl_easy_perform()\fP on this easy handle. -Removing an easy handle while being used is perfectly legal and will -effectively halt the transfer in progress involving that easy handle. All -other easy handles and transfers will remain unaffected. +Removing an easy handle while being used, will effectively halt the transfer +in progress involving that easy handle. All other easy handles and transfers +will remain unaffected. .SH RETURN VALUE CURLMcode type, general libcurl multi interface error code. .SH "SEE ALSO" -.BR curl_multi_cleanup "(3)," curl_multi_init "(3), " -.BR curl_multi_add_handle "(3) " +.BR curl_multi_cleanup "(3)," curl_multi_init "(3)" diff --git a/docs/libcurl/curl_multi_setopt.3 b/docs/libcurl/curl_multi_setopt.3 index 4cd4075..3af2c74 100644 --- a/docs/libcurl/curl_multi_setopt.3 +++ b/docs/libcurl/curl_multi_setopt.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_multi_setopt 3 "4 Nov 2014" "libcurl 7.39.0" "libcurl Manual" +.TH curl_multi_setopt 3 "10 Oct 2006" "libcurl 7.16.0" "libcurl Manual" .SH NAME curl_multi_setopt \- set options for a curl multi handle .SH SYNOPSIS @@ -27,40 +27,183 @@ curl_multi_setopt \- set options for a curl multi handle CURLMcode curl_multi_setopt(CURLM * multi_handle, CURLMoption option, param); .SH DESCRIPTION -\fIcurl_multi_setopt(3)\fP is used to tell a libcurl multi handle how to -behave. By using the appropriate options to \fIcurl_multi_setopt(3)\fP, you -can change libcurl's behaviour when using that multi handle. All options are -set with the \fIoption\fP followed by the parameter \fIparam\fP. That -parameter can be a \fBlong\fP, a \fBfunction pointer\fP, an \fBobject -pointer\fP or a \fBcurl_off_t\fP type, depending on what the specific option -expects. Read this manual carefully as bad input values may cause libcurl to -behave badly! You can only set one option in each function call. +curl_multi_setopt() is used to tell a libcurl multi handle how to behave. By +using the appropriate options to \fIcurl_multi_setopt(3)\fP, you can change +libcurl's behaviour when using that multi handle. All options are set with +the \fIoption\fP followed by the parameter \fIparam\fP. That parameter can be +a \fBlong\fP, a \fBfunction pointer\fP, an \fBobject pointer\fP or a +\fBcurl_off_t\fP type, depending on what the specific option expects. Read +this manual carefully as bad input values may cause libcurl to behave badly! +You can only set one option in each function call. .SH OPTIONS .IP CURLMOPT_SOCKETFUNCTION -See \fICURLMOPT_SOCKETFUNCTION(3)\fP +Pass a pointer to a function matching the \fBcurl_socket_callback\fP +prototype. The \fIcurl_multi_socket_action(3)\fP function informs the +application about updates in the socket (file descriptor) status by doing +none, one, or multiple calls to the curl_socket_callback given in the +\fBparam\fP argument. They update the status with changes since the previous +time a \fIcurl_multi_socket(3)\fP function was called. If the given callback +pointer is NULL, no callback will be called. Set the callback's \fBuserp\fP +argument with \fICURLMOPT_SOCKETDATA\fP. See \fIcurl_multi_socket(3)\fP for +more callback details. .IP CURLMOPT_SOCKETDATA -See \fICURLMOPT_SOCKETDATA(3)\fP +Pass a pointer to whatever you want passed to the \fBcurl_socket_callback\fP's +fourth argument, the userp pointer. This is not used by libcurl but only +passed-thru as-is. Set the callback pointer with +\fICURLMOPT_SOCKETFUNCTION\fP. .IP CURLMOPT_PIPELINING -See \fICURLMOPT_PIPELINING(3)\fP +Pass a long set to 1 to enable or 0 to disable. Enabling pipelining on a multi +handle will make it attempt to perform HTTP Pipelining as far as possible for +transfers using this handle. This means that if you add a second request that +can use an already existing connection, the second request will be \&"piped" +on the same connection rather than being executed in parallel. (Added in +7.16.0) .IP CURLMOPT_TIMERFUNCTION -See \fICURLMOPT_TIMERFUNCTION(3)\fP +Pass a pointer to a function matching the \fBcurl_multi_timer_callback\fP +prototype: int curl_multi_timer_callback(CURLM *multi /* multi handle */, +long timeout_ms /* timeout in milliseconds */, void *userp /* TIMERDATA */). +This function will then be called when the timeout value +changes. The timeout value is at what latest time the application should call +one of the \&"performing" functions of the multi interface +(\fIcurl_multi_socket_action(3)\fP and \fIcurl_multi_perform(3)\fP) - to allow +libcurl to keep timeouts and retries etc to work. A timeout value of -1 means +that there is no timeout at all, and 0 means that the timeout is already +reached. Libcurl attempts to limit calling this only when the fixed future +timeout time actually changes. See also \fICURLMOPT_TIMERDATA\fP. The callback +should return 0 on success, and -1 on error. This +callback can be used instead of, or in addition to, +\fIcurl_multi_timeout(3)\fP. (Added in 7.16.0) .IP CURLMOPT_TIMERDATA -See \fICURLMOPT_TIMERDATA(3)\fP +Pass a pointer to whatever you want passed to the +\fBcurl_multi_timer_callback\fP's third argument, the userp pointer. This is +not used by libcurl but only passed-thru as-is. Set the callback pointer with +\fICURLMOPT_TIMERFUNCTION\fP. (Added in 7.16.0) +.IP CURLMOPT_MAXCONNECTS +Pass a long. The set number will be used as the maximum amount of +simultaneously open connections that libcurl may keep in its connection cache +after completed use. By default libcurl will enlarge the size for each added +easy handle to make it fit 4 times the number of added easy handles. + +By setting this option, you can prevent the cache size from growing beyond the +limit set by you. + +When the cache is full, curl closes the oldest one in the cache to prevent the +number of open connections from increasing. + +This option is for the multi handle's use only, when using the easy interface +you should instead use the \fICURLOPT_MAXCONNECTS(3)\fP option. + +See \fICURLMOPT_MAX_TOTAL_CONNECTIONS\fP for limiting the number of active +connections. + +(Added in 7.16.3) .IP CURLMOPT_MAX_HOST_CONNECTIONS -See \fICURLMOPT_MAX_HOST_CONNECTIONS(3)\fP +Pass a long. The set number will be used as the maximum amount of +simultaneously open connections to a single host. For each new session to +a host, libcurl will open a new connection up to the limit set by +CURLMOPT_MAX_HOST_CONNECTIONS. When the limit is reached, the sessions will +be pending until there are available connections. If CURLMOPT_PIPELINING is +1, libcurl will try to pipeline if the host is capable of it. + +The default value is 0, which means that there is no limit. +However, for backwards compatibility, setting it to 0 when CURLMOPT_PIPELINING +is 1 will not be treated as unlimited. Instead it will open only 1 connection +and try to pipeline on it. + +(Added in 7.30.0) .IP CURLMOPT_MAX_PIPELINE_LENGTH -See \fICURLMOPT_MAX_PIPELINE_LENGTH(3)\fP +Pass a long. The set number will be used as the maximum amount of requests +in a pipelined connection. When this limit is reached, libcurl will use another +connection to the same host (see CURLMOPT_MAX_HOST_CONNECTIONS), or queue the +requests until one of the pipelines to the host is ready to accept a request. +Thus, the total number of requests in-flight is CURLMOPT_MAX_HOST_CONNECTIONS * +CURLMOPT_MAX_PIPELINE_LENGTH. +The default value is 5. + +(Added in 7.30.0) .IP CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE -See \fICURLMOPT_CONTENT_LENGTH_PENALTY_SIZE(3)\fP +Pass a long. If a pipelined connection is currently processing a request +with a Content-Length larger than CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE, that +connection will not be considered for additional requests, even if it is +shorter than CURLMOPT_MAX_PIPELINE_LENGTH. +The default value is 0, which means that the penalization is inactive. + +(Added in 7.30.0) .IP CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE -See \fICURLMOPT_CHUNK_LENGTH_PENALTY_SIZE(3)\fP +Pass a long. If a pipelined connection is currently processing a +chunked (Transfer-encoding: chunked) request with a current chunk length +larger than CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE, that connection will not be +considered for additional requests, even if it is shorter than +CURLMOPT_MAX_PIPELINE_LENGTH. +The default value is 0, which means that the penalization is inactive. + +(Added in 7.30.0) .IP CURLMOPT_PIPELINING_SITE_BL -See \fICURLMOPT_PIPELINING_SITE_BL(3)\fP +Pass an array of char *, ending with NULL. This is a list of sites that are +blacklisted from pipelining, i.e sites that are known to not support HTTP +pipelining. The array is copied by libcurl. + +The default value is NULL, which means that there is no blacklist. + +Pass a NULL pointer to clear the blacklist. + +Example: + +.nf + site_blacklist[] = + { + "www.haxx.se", + "www.example.com:1234", + NULL + }; + + curl_multi_setopt(m, CURLMOPT_PIPELINE_SITE_BL, site_blacklist); +.fi + +(Added in 7.30.0) .IP CURLMOPT_PIPELINING_SERVER_BL -See \fICURLMOPT_PIPELINING_SERVER_BL(3)\fP +Pass an array of char *, ending with NULL. This is a list of server types +prefixes (in the Server: HTTP header) that are blacklisted from pipelining, +i.e server types that are known to not support HTTP pipelining. The array is +copied by libcurl. + +Note that the comparison matches if the Server: header begins with the string +in the blacklist, i.e "Server: Ninja 1.2.3" and "Server: Ninja 1.4.0" can +both be blacklisted by having "Ninja" in the backlist. + +The default value is NULL, which means that there is no blacklist. + +Pass a NULL pointer to clear the blacklist. + +Example: + +.nf + server_blacklist[] = + { + "Microsoft-IIS/6.0", + "nginx/0.8.54", + NULL + }; + + curl_multi_setopt(m, CURLMOPT_PIPELINE_SERVER_BL, server_blacklist); +.fi + +(Added in 7.30.0) .IP CURLMOPT_MAX_TOTAL_CONNECTIONS -See \fICURLMOPT_MAX_TOTAL_CONNECTIONS(3)\fP +Pass a long. The set number will be used as the maximum amount of +simultaneously open connections in total. For each new session, libcurl +will open a new connection up to the limit set by +CURLMOPT_MAX_TOTAL_CONNECTIONS. When the limit is reached, the sessions will +be pending until there are available connections. If CURLMOPT_PIPELINING is +1, libcurl will try to pipeline if the host is capable of it. + +The default value is 0, which means that there is no limit. +However, for backwards compatibility, setting it to 0 when CURLMOPT_PIPELINING +is 1 will not be treated as unlimited. Instead it will open only 1 connection +and try to pipeline on it. + +(Added in 7.30.0) .SH RETURNS The standard CURLMcode for multi interface error codes. Note that it returns a CURLM_UNKNOWN_OPTION if you try setting an option that this version of libcurl diff --git a/docs/libcurl/curl_multi_wait.3 b/docs/libcurl/curl_multi_wait.3 index a76fba3..21ade93 100644 --- a/docs/libcurl/curl_multi_wait.3 +++ b/docs/libcurl/curl_multi_wait.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2013, Daniel Stenberg, , 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,9 +33,9 @@ CURLMcode curl_multi_wait(CURLM *multi_handle, int *numfds); .ad .SH DESCRIPTION -\fIcurl_multi_wait(3)\fP polls all file descriptors used by the curl easy -handles contained in the given multi handle set. It will block until activity -is detected on at least one of the handles or \fItimeout_ms\fP has passed. +This function polls on all file descriptors used by the curl easy handles +contained in the given multi handle set. It will block until activity is +detected on at least one of the handles or \fItimeout_ms\fP has passed. Alternatively, if the multi handle has a pending internal timeout that has a shorter expiry time than \fItimeout_ms\fP, that shorter time will be used instead to make sure timeout accuracy is reasonably kept. @@ -43,7 +43,7 @@ instead to make sure timeout accuracy is reasonably kept. The calling application may pass additional curl_waitfd structures which are similar to \fIpoll(2)\fP's pollfd structure to be waited on in the same call. -On completion, if \fInumfds\fP is non-NULL, it will be populated with the +On completion, if \fInumfds\fP is supplied, it will be populated with the total number of file descriptors on which interesting events occured. This number can include both libcurl internal descriptors as well as descriptors provided in \fIextra_fds\fP. diff --git a/docs/libcurl/curl_version_info.3 b/docs/libcurl/curl_version_info.3 index 1b8f9c1..f85cd00 100644 --- a/docs/libcurl/curl_version_info.3 +++ b/docs/libcurl/curl_version_info.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH curl_version_info 3 "2 Nov 2014" "libcurl 7.40.0" "libcurl Manual" +.TH curl_version_info 3 "18 Feb 2014" "libcurl 7.33.0" "libcurl Manual" .SH NAME curl_version_info - returns run-time libcurl version info .SH SYNOPSIS @@ -96,10 +96,7 @@ bits are: .IP CURL_VERSION_IPV6 supports IPv6 .IP CURL_VERSION_KERBEROS4 -supports Kerberos V4 (when using FTP) -.IP CURL_VERSION_KERBEROS5 -supports Kerberos V5 authentication for FTP, IMAP, POP3, SMTP and SOCKSv5 proxy -(Added in 7.40.0) +supports kerberos4 (when using FTP) .IP CURL_VERSION_SSL supports SSL (HTTPS/FTPS) (Added in 7.10) .IP CURL_VERSION_LIBZ @@ -127,14 +124,9 @@ libcurl was built with support for IDNA, domain names with international letters. (Added in 7.12.0) .IP CURL_VERSION_SSPI libcurl was built with support for SSPI. This is only available on Windows and -makes libcurl use Windows-provided functions for Kerberos, NTLM, SPNEGO and -Digest authentication. It also allows libcurl to use the current user -credentials without the app having to pass them on. (Added in 7.13.2) -.IP CURL_VERSION_GSSAPI -libcurl was built with support for GSS-API. This makes libcurl use provided -functions for Kerberos and SPNEGO authentication. It also allows libcurl -to use the current user credentials without the app having to pass them on. -(Added in 7.38.0) +makes libcurl use Windows-provided functions for NTLM authentication. It also +allows libcurl to use the current user and the current user's password without +the app having to pass them on. (Added in 7.13.2) .IP CURL_VERSION_CONV libcurl was built with support for character conversions, as provided by the CURLOPT_CONV_* callbacks. (Added in 7.15.4) @@ -146,14 +138,12 @@ libcurl was built with support for NTLM delegation to a winbind helper. .IP CURL_VERSION_HTTP2 libcurl was built with support for HTTP2. (Added in 7.33.0) -.IP CURL_VERSION_UNIX_SOCKETS -libcurl was built with support for Unix domain sockets. -(Added in 7.40.0) .RE \fIssl_version\fP is an ASCII string for the OpenSSL version used. If libcurl has no SSL support, this is NULL. -\fIssl_version_num\fP is always 0. +\fIssl_version_num\fP is the numerical OpenSSL version value as defined by the +OpenSSL project. If libcurl has no SSL support, this is 0. \fIlibz_version\fP is an ASCII string (there is no numerical version). If libcurl has no libz support, this is NULL. diff --git a/docs/libcurl/getinfo-times b/docs/libcurl/getinfo-times index bb0fdcb..d767d7a 100644 --- a/docs/libcurl/getinfo-times +++ b/docs/libcurl/getinfo-times @@ -1,6 +1,6 @@ An overview of the six time values available from curl_easy_getinfo() -curl_easy_perform() +curk_easy_perform() | |--NT |--|--CT diff --git a/docs/libcurl/libcurl-easy.3 b/docs/libcurl/libcurl-easy.3 index f8506a2..698a4ce 100644 --- a/docs/libcurl/libcurl-easy.3 +++ b/docs/libcurl/libcurl-easy.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, , 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 3 "19 Sep 2014" "libcurl" "libcurl easy interface" +.TH libcurl 3 "12 Aug 2003" "libcurl 7.10.7" "libcurl easy interface" .SH NAME libcurl-easy \- easy interface overview .SH DESCRIPTION @@ -33,17 +33,6 @@ without a specified URL as you may have figured out yourself). You might want to set some callbacks as well that will be called from the library when data is available etc. \fIcurl_easy_setopt(3)\fP is used for all this. -\fICURLOPT_URL(3)\fP is only option you really must set, as otherwise there -can be no transfer. Another commonly used option is \fICURLOPT_VERBOSE(3)\fP -that will help you see what libcurl is doing under the hood, very useful when -debugging for example. The \fIcurl_easy_setopt(3)\fP man page has a full index -of the over 200 available options. - -If you at any point would like to blank all previously set options for a -single easy handle, you can call \fIcurl_easy_reset(3)\fP and you can also -make a clone of an easy handle (with all its set options) using -\fIcurl_easy_duphandle(3)\fP. - When all is setup, you tell libcurl to perform the transfer using \fIcurl_easy_perform(3)\fP. It will then do the entire operation and won't return until it is done (successfully or not). @@ -53,6 +42,4 @@ transfer, or if you're done, cleanup the session by calling \fIcurl_easy_cleanup(3)\fP. If you want persistent connections, you don't cleanup immediately, but instead run ahead and perform other transfers using the same easy handle. -.SH "SEE ALSO" -.BR curl_easy_init "(3)," curl_easy_cleanup "(3)," curl_easy_setopt "(3), " -.BR libcurl-errors "(3), " libcurl-multi "(3), " libcurl "(3) " + diff --git a/docs/libcurl/libcurl-errors.3 b/docs/libcurl/libcurl-errors.3 index 07091b5..9f295d4 100644 --- a/docs/libcurl/libcurl-errors.3 +++ b/docs/libcurl/libcurl-errors.3 @@ -83,9 +83,6 @@ FTP servers return a 227-line as a response to a PASV command. If libcurl fails to parse that line, this return code is passed back. .IP "CURLE_FTP_CANT_GET_HOST (15)" An internal failure to lookup the host used for the new connection. -.IP "CURLE_HTTP2 (16)" -A problem was detected in the HTTP2 framing layer. This is somewhat generic -and can be one out of several problems, see the error buffer for details. .IP "CURLE_FTP_COULDNT_SET_TYPE (17)" Received an error when trying to set the transfer mode to binary or ASCII. .IP "CURLE_PARTIAL_FILE (18)" @@ -297,7 +294,3 @@ Not enough memory was available. .IP "CURLSHE_NOT_BUILT_IN (5)" The requested sharing could not be done because the library you use don't have that particular feature enabled. (Added in 7.23.0) -.SH "SEE ALSO" -.BR curl_easy_strerror "(3), " curl_multi_strerror "(3), " -.BR curl_share_strerror "(3), " CURLOPT_ERRORBUFFER "(3), " -.BR CURLOPT_VERBOSE "(3), " CURLOPT_DEBUGFUNCTION "(3) " diff --git a/docs/libcurl/libcurl-multi.3 b/docs/libcurl/libcurl-multi.3 index 770d4a5..2af0299 100644 --- a/docs/libcurl/libcurl-multi.3 +++ b/docs/libcurl/libcurl-multi.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, , 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,7 @@ .\" * .\" ************************************************************************** .\" -.TH libcurl-multi 3 "19 Sep 2014" "libcurl" "libcurl multi interface" +.TH libcurl-multi 3 "3 Feb 2007" "libcurl 7.16.0" "libcurl multi interface" .SH NAME libcurl-multi \- how to use the multi interface .SH DESCRIPTION @@ -43,28 +43,18 @@ complicated for the application. 3. Enable the application to wait for action on its own file descriptors and curl's file descriptors simultaneous easily. - -4. Enable event-based handling and scaling transfers up to and beyond -thousands of parallel connections. .SH "ONE MULTI HANDLE MANY EASY HANDLES" To use the multi interface, you must first create a 'multi handle' with \fIcurl_multi_init(3)\fP. This handle is then used as input to all further curl_multi_* functions. -With a multi handle and the multi interface you can do any amount of -simultaneous transfers in parallel. Each single transfer is built up around an -easy handle. You must create the easy handles you need, and setup the -appropriate options for each easy handle, as outlined in the \fIlibcurl(3)\fP -man page, using \fIcurl_easy_setopt(3)\fP. - -There are two flavours of the multi interface, the select() oriented one and -the event based one we called multi_socket. You will benefit from reading -through the description of both versions to full understand how they work and -differentiate. We start out with the select() oriented version. +Each single transfer is built up with an easy handle. You must create them, +and setup the appropriate options for each easy handle, as outlined in the +\fIlibcurl(3)\fP man page, using \fIcurl_easy_setopt(3)\fP. -When an easy handle is setup for a transfer, then instead of using -\fIcurl_easy_perform(3)\fP like when using the easy interface for transfers, -you should add the easy handle to the multi handle with +When the easy handle is setup for a transfer, then instead of using +\fIcurl_easy_perform(3)\fP (as when using the easy interface for transfers), +you should instead add the easy handle to the multi handle using \fIcurl_multi_add_handle(3)\fP. The multi handle is sometimes referred to as a \'multi stack\' because of the fact that it may hold a large amount of easy handles. @@ -81,8 +71,7 @@ application drive. You drive the transfers by invoking anything available to transfer. It'll use the callbacks and everything else you have setup in the individual easy handles. It'll transfer data on all current transfers in the multi stack that are ready to transfer anything. It -may be all, it may be none. When there's nothing more to do for now, it -returns back to the calling application. +may be all, it may be none. Your application can acquire knowledge from libcurl when it would like to get invoked to transfer data, so that you don't have to busy-loop and call that @@ -91,9 +80,7 @@ interface using which you can extract fd_sets from libcurl to use in select() or poll() calls in order to get to know when the transfers in the multi stack might need attention. This also makes it very easy for your program to wait for input on your own private file descriptors at the same time or perhaps -timeout every now and then, should you want that. \fIcurl_multi_timeout(3)\fP -also helps you with providing a suitable timeout period for your select() -call. +timeout every now and then, should you want that. \fIcurl_multi_perform(3)\fP stores the number of still running transfers in one of its input arguments, and by reading that you can figure out when all @@ -134,39 +121,21 @@ using large numbers of simultaneous connections. When using this API, you add easy handles to the multi handle just as with the normal multi interface. Then you also set two callbacks with the CURLMOPT_SOCKETFUNCTION and CURLMOPT_TIMERFUNCTION options to -\fIcurl_multi_setopt(3)\fP. They are two callback functions that libcurl will -call with information about what sockets to wait for, and for what activity, -and what the curret timeout time is - if that expires libcurl should be -notified. - -The multi_socket API is designed to inform your application about which -sockets libcurl is currently using and for what activities (read and/or write) -on those sockets your application is expected to wait for. - -Your application must make sure to receive all sockets informed about in the -CURLMOPT_SOCKETFUNCTION callback and make sure it reacts on the given activity -on them. When a socket has the given activity, you call +\fIcurl_multi_setopt(3)\fP. + +The API is then designed to inform your application about which sockets +libcurl is currently using and for what activities (read and/or write) on +those sockets your application is expected to wait for. + +Your application must then make sure to receive all sockets informed about in +the CURLMOPT_SOCKETFUNCTION callback and make sure it reacts on the given +activity on them. When a socket has the given activity, you call \fIcurl_multi_socket_action(3)\fP specifying which socket and action there are. The CURLMOPT_TIMERFUNCTION callback is called to set a timeout. When that timeout expires, your application should call the \fIcurl_multi_socket_action(3)\fP function saying it was due to a timeout. - -This API is typically used with an event-driven underlying functionality (like -libevent, libev, kqueue, epoll or similar) which which the application -"subscribes" on socket changes. This allows applications and libcurl to much -better scale upward and beyond thousands of simultaneous transfers without -losing performance. - -When you've added your initial set of handles, you call -\fIcurl_multi_socket_action(3)\fP with CURL_SOCKET_TIMEOUT set in the sockfd -argument, and you'll get callbacks call that sets you up and you then continue -to call \fIcurl_multi_socket_action(3)\fP accordingly when you get activity on -the sockets you've been asked to wait on, or if the timeout timer expires. - -You can poll \fIcurl_multi_info_read(3)\fP to see if any transfer has -completed, as it then has a message saying so. .SH "BLOCKING" A few areas in the code are still using blocking code, even when used from the multi interface. While we certainly want and intend for these to get fixed in @@ -180,5 +149,3 @@ the future, you should be aware of the following current restrictions: - file:// transfers - TELNET transfers .fi -.SH "SEE ALSO" -.BR libcurl-errors "(3), " libcurl-easy "(3), " libcurl "(3) " diff --git a/docs/libcurl/libcurl-share.3 b/docs/libcurl/libcurl-share.3 index b46eeda..7010cca 100644 --- a/docs/libcurl/libcurl-share.3 +++ b/docs/libcurl/libcurl-share.3 @@ -63,4 +63,3 @@ When you're done using the share, make sure that no easy handle is still using it, and call \fIcurl_share_cleanup(3)\fP on the handle. .SH "SEE ALSO" .BR curl_share_init "(3), " curl_share_setopt "(3), " curl_share_cleanup "(3)" -.BR libcurl-errors "(3), " libcurl-easy "(3), " libcurl-multi "(3) " diff --git a/docs/libcurl/libcurl-tutorial.3 b/docs/libcurl/libcurl-tutorial.3 index 11b0190..018001d 100644 --- a/docs/libcurl/libcurl-tutorial.3 +++ b/docs/libcurl/libcurl-tutorial.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH libcurl-tutorial 3 "19 Sep 2014" "libcurl" "libcurl programming" +.TH libcurl-tutorial 3 "4 Mar 2009" "libcurl" "libcurl programming" .SH NAME libcurl-tutorial \- libcurl programming tutorial .SH "Objective" @@ -40,7 +40,7 @@ refer to their respective man pages. .SH "Building" There are many different ways to build C programs. This chapter will assume a -Unix style build process. If you use a different build system, you can still +UNIX-style build process. If you use a different build system, you can still read this to get general information that may apply to your environment as well. .IP "Compiling the Program" @@ -137,17 +137,15 @@ rather than at build-time (if possible of course). By calling struct, your program can figure out exactly what the currently running libcurl supports. -.SH "Two Interfaces" -libcurl first introduced the so called easy interface. All operations in the -easy interface are prefixed with 'curl_easy'. The easy interface lets you do -single transfers with a synchronous and blocking function call. - -libcurl also offers another interface that allows multiple simultaneous -transfers in a single thread, the so called multi interface. More about that -interface is detailed in a separate chapter further down. You still need to -understand the easy interface first, so please continue reading for better -understanding. .SH "Handle the Easy libcurl" +libcurl first introduced the so called easy interface. All operations in the +easy interface are prefixed with 'curl_easy'. + +Recent libcurl versions also offer the multi interface. More about that +interface, what it is targeted for and how to use it is detailed in a separate +chapter further down. You still need to understand the easy interface first, +so please continue reading for better understanding. + To use the easy interface, you must first create yourself an easy handle. You need one handle for each easy session you want to perform. Basically, you should use one handle for every thread you plan to use for transferring. You @@ -164,18 +162,13 @@ transfer or series of transfers. You set properties and options for this handle using \fIcurl_easy_setopt(3)\fP. They control how the subsequent transfer or transfers will be made. Options remain set in the handle until set again to -something different. They are sticky. Multiple requests using the same handle -will use the same options. - -If you at any point would like to blank all previously set options for a -single easy handle, you can call \fIcurl_easy_reset(3)\fP and you can also -make a clone of an easy handle (with all its set options) using -\fIcurl_easy_duphandle(3)\fP. +something different. Alas, multiple requests using the same handle will use +the same options. Many of the options you set in libcurl are "strings", pointers to data terminated with a zero byte. When you set strings with -\fIcurl_easy_setopt(3)\fP, libcurl makes its own copy so that they don't need -to be kept around in your application after being set[4]. +\fIcurl_easy_setopt(3)\fP, libcurl makes its own copy so that they don't +need to be kept around in your application after being set[4]. One of the most basic properties to set in the handle is the URL. You set your preferred URL to transfer with \fICURLOPT_URL(3)\fP in a manner similar to: @@ -264,7 +257,7 @@ than one thread at any given time. libcurl is completely thread safe, except for two issues: signals and SSL/TLS handlers. Signals are used for timing out name resolves (during DNS lookup) - -when built without using either the c-ares or threaded resolver backends. +when built without c-ares support and not on Windows. If you are accessing HTTPS or FTPS URLs in a multi-threaded manner, you are then of course using the underlying SSL library multi-threaded and those libs @@ -278,7 +271,7 @@ OpenSSL GnuTLS - http://gnutls.org/manual/html_node/Thread-safety.html + http://www.gnu.org/software/gnutls/manual/html_node/Multi_002dthreaded-applications.html NSS @@ -412,7 +405,7 @@ similar to the \fICURLOPT_USERPWD(3)\fP option like this: curl_easy_setopt(easyhandle, CURLOPT_PROXYUSERPWD, "myname:thesecret"); -There's a long time Unix "standard" way of storing FTP user names and +There's a long time UNIX "standard" way of storing ftp user names and passwords, namely in the $HOME/.netrc file. The file should be made private so that only the user may read it (see also the "Security Considerations" chapter), as it might contain the password in plain text. libcurl has the @@ -449,7 +442,7 @@ authentication method is called 'Basic', which is sending the name and password in clear-text in the HTTP request, base64-encoded. This is insecure. At the time of this writing, libcurl can be built to use: Basic, Digest, NTLM, -Negotiate (SPNEGO). You can tell libcurl which one to use +Negotiate, GSS-Negotiate and SPNEGO. You can tell libcurl which one to use with \fICURLOPT_HTTPAUTH(3)\fP as in: curl_easy_setopt(easyhandle, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST); @@ -1129,9 +1122,9 @@ 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. +To avoid this problem, use HTTP authentication methods or other protocols that +don't let snoopers see your password: HTTP with Digest, NTLM or GSS +authentication, HTTPS, FTPS, SCP, SFTP and FTP-Kerberos are a few examples. .IP "Redirects" The \fICURLOPT_FOLLOWLOCATION(3)\fP option automatically follows HTTP @@ -1302,44 +1295,39 @@ 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. -.SH "The multi Interface" +.SH "Multiple Transfers Using 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 done. The multi interface, on the other hand, allows your program to transfer -multiple files in both directions at the same time, without forcing you to use -multiple threads. The name might make it seem that the multi interface is for -multi-threaded programs, but the truth is almost the reverse. The multi -interface allows a single-threaded application to perform the same kinds of -multiple, simultaneous transfers that multi-threaded programs can perform. It -allows many of the benefits of multi-threaded transfers without the complexity -of managing and synchronizing many threads. - -To complicate matters somewhat more, there are even two versions of the multi -interface. The event based one, also called multi_socket and the "normal one" -designed for using with select(). See the libcurl-multi.3 man page for details -on the multi_socket event based API, this description here is for the select() -oriented one. +multiple files in both directions at the same time, without forcing you +to use multiple threads. The name might make it seem that the multi +interface is for multi-threaded programs, but the truth is almost the +reverse. The multi interface can allow a single-threaded application +to perform the same kinds of multiple, simultaneous transfers that +multi-threaded programs can perform. It allows many of the benefits +of multi-threaded transfers without the complexity of managing and +synchronizing many threads. To use this interface, you are better off if you first understand the basics of how to use the easy interface. The multi interface is simply a way to make multiple transfers at the same time by adding up multiple easy handles into a "multi stack". -You create the easy handles you want, one for each concurrent transfer, and -you set all the options just like you learned above, and then you create a -multi handle with \fIcurl_multi_init(3)\fP and add all those easy handles to -that multi handle with \fIcurl_multi_add_handle(3)\fP. +You create the easy handles you want and you set all the options just like you +have been told above, and then you create a multi handle with +\fIcurl_multi_init(3)\fP and add all those easy handles to that multi handle +with \fIcurl_multi_add_handle(3)\fP. When you've added the handles you have for the moment (you can still add new ones at any time), you start the transfers by calling \fIcurl_multi_perform(3)\fP. -\fIcurl_multi_perform(3)\fP is asynchronous. It will only perform what can be -done now and then return back control to your program. It is designed to never -block. You need to keep calling the function until all transfers are -completed. +\fIcurl_multi_perform(3)\fP is asynchronous. It will only execute as little as +possible and then return back control to your program. It is designed to never +block. The best usage of this interface is when you do a select() on all possible file descriptors or sockets to know when to call libcurl again. This also @@ -1352,12 +1340,11 @@ When you then call select(), it'll return when one of the file handles signal action and you then call \fIcurl_multi_perform(3)\fP to allow libcurl to do what it wants to do. Take note that libcurl does also feature some time-out code so we advise you to never use very long timeouts on select() before you -call \fIcurl_multi_perform(3)\fP again. \fIcurl_multi_timeout(3)\fP is -provided to help you get a suitable timeout period. - -Another precaution you should use: always call \fIcurl_multi_fdset(3)\fP -immediately before the select() call since the current set of file descriptors -may change in any curl function invoke. +call \fIcurl_multi_perform(3)\fP, which thus should be called unconditionally +every now and then even if none of its file descriptors have signaled +ready. Another precaution you should use: always call +\fIcurl_multi_fdset(3)\fP immediately before the select() call since the +current set of file descriptors may change when calling a curl function. If you want to stop the transfer of one of the easy handles in the stack, you can use \fIcurl_multi_remove_handle(3)\fP to remove individual easy @@ -1402,11 +1389,9 @@ This happens on Windows machines when libcurl is built and used as a DLL. However, you can still do this on Windows if you link with a static library. .IP "[3]" -The curl-config tool is generated at build-time (on Unix-like systems) and +The curl-config tool is generated at build-time (on UNIX-like systems) and should be installed with the 'make install' or similar instruction that installs the library, header files, man pages etc. .IP "[4]" This behavior was different in versions before 7.17.0, where strings had to remain valid past the end of the \fIcurl_easy_setopt(3)\fP call. -.SH "SEE ALSO" -.BR libcurl-errors "(3), " libcurl-multi "(3), " libcurl-easy "(3) " diff --git a/docs/libcurl/libcurl.3 b/docs/libcurl/libcurl.3 index 39bcccd..4cb687d 100644 --- a/docs/libcurl/libcurl.3 +++ b/docs/libcurl/libcurl.3 @@ -40,7 +40,7 @@ details. 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 +desired set of options in that handle with \fIcurk_easy_setopt(3)\fP. Options you set with \fIcurl_easy_setopt(3)\fP stick. They will be used on every repeated use of this handle until you either change the option, or you reset them all with \fIcurl_easy_reset(3)\fP. @@ -148,16 +148,18 @@ the library code. For example, when libcurl is built for SSL capability via the GNU TLS library, there is an elaborate tree inside that library that describes the SSL protocol. -\fIcurl_global_init(3)\fP is the function that you must call. This may -allocate resources (e.g. the memory for the GNU TLS tree mentioned above), so -the companion function \fIcurl_global_cleanup(3)\fP releases them. +\fIcurl_global_init()\fP is the function that you must call. This may +allocate resources (e.g. the memory for the GNU TLS tree mentioned +above), so the companion function \fIcurl_global_cleanup()\fP releases +them. -The basic rule for constructing a program that uses libcurl is this: Call -\fIcurl_global_init(3)\fP, with a \fICURL_GLOBAL_ALL\fP argument, immediately -after the program starts, while it is still only one thread and before it uses -libcurl at all. Call \fIcurl_global_cleanup(3)\fP immediately before the -program exits, when the program is again only one thread and after its last -use of libcurl. +The basic rule for constructing a program that uses libcurl is this: +Call \fIcurl_global_init()\fP, with a \fICURL_GLOBAL_ALL\fP argument, +immediately after the program starts, while it is still only one +thread and before it uses libcurl at all. Call +\fIcurl_global_cleanup()\fP immediately before the program exits, when +the program is again only one thread and after its last use of +libcurl. You can call both of these multiple times, as long as all calls meet these requirements and the number of calls to each is the same. @@ -182,42 +184,48 @@ your code doesn't know about other parts of the program -- it doesn't know whether they use libcurl or not. And its code doesn't necessarily run at the start and end of the whole program. -A module like this must have global constant functions of its own, just like -\fIcurl_global_init(3)\fP and \fIcurl_global_cleanup(3)\fP. The module thus -has control at the beginning and end of the program and has a place to call -the libcurl functions. Note that if multiple modules in the program use -libcurl, they all will separately call the libcurl functions, and that's OK -because only the first \fIcurl_global_init(3)\fP and the last -\fIcurl_global_cleanup(3)\fP in a program change anything. (libcurl uses a -reference count in static memory). - -In a C++ module, it is common to deal with the global constant situation by -defining a special class that represents the global constant environment of -the module. A program always has exactly one object of the class, in static -storage. That way, the program automatically calls the constructor of the -object as the program starts up and the destructor as it terminates. As the -author of this libcurl-using module, you can make the constructor call -\fIcurl_global_init(3)\fP and the destructor call \fIcurl_global_cleanup(3)\fP -and satisfy libcurl's requirements without your user having to think about it. - -\fIcurl_global_init(3)\fP has an argument that tells what particular parts of -the global constant environment to set up. In order to successfully use any -value except \fICURL_GLOBAL_ALL\fP (which says to set up the whole thing), you -must have specific knowledge of internal workings of libcurl and all other -parts of the program of which it is part. - -A special part of the global constant environment is the identity of the -memory allocator. \fIcurl_global_init(3)\fP selects the system default memory -allocator, but you can use \fIcurl_global_init_mem(3)\fP to supply one of your -own. However, there is no way to use \fIcurl_global_init_mem(3)\fP in a -modular program -- all modules in the program that might use libcurl would -have to agree on one allocator. - -There is a failsafe in libcurl that makes it usable in simple situations -without you having to worry about the global constant environment at all: -\fIcurl_easy_init(3)\fP sets up the environment itself if it hasn't been done -yet. The resources it acquires to do so get released by the operating system -automatically when the program exits. +A module like this must have global constant functions of its own, +just like \fIcurl_global_init()\fP and \fIcurl_global_cleanup()\fP. +The module thus has control at the beginning and end of the program +and has a place to call the libcurl functions. Note that if multiple +modules in the program use libcurl, they all will separately call the +libcurl functions, and that's OK because only the first +\fIcurl_global_init()\fP and the last \fIcurl_global_cleanup()\fP in a +program change anything. (libcurl uses a reference count in static +memory). + +In a C++ module, it is common to deal with the global constant +situation by defining a special class that represents the global +constant environment of the module. A program always has exactly one +object of the class, in static storage. That way, the program +automatically calls the constructor of the object as the program +starts up and the destructor as it terminates. As the author of this +libcurl-using module, you can make the constructor call +\fIcurl_global_init()\fP and the destructor call +\fIcurl_global_cleanup()\fP and satisfy libcurl's requirements without +your user having to think about it. + +\fIcurl_global_init()\fP has an argument that tells what particular +parts of the global constant environment to set up. In order to +successfully use any value except \fICURL_GLOBAL_ALL\fP (which says to +set up the whole thing), you must have specific knowledge of internal +workings of libcurl and all other parts of the program of which it is +part. + +A special part of the global constant environment is the identity of +the memory allocator. \fIcurl_global_init()\fP selects the system +default memory allocator, but you can use \fIcurl_global_init_mem()\fP +to supply one of your own. However, there is no way to use +\fIcurl_global_init_mem()\fP in a modular program -- all modules in +the program that might use libcurl would have to agree on one +allocator. + +There is a failsafe in libcurl that makes it usable in simple +situations without you having to worry about the global constant +environment at all: \fIcurl_easy_init()\fP sets up the environment +itself if it hasn't been done yet. The resources it acquires to do so +get released by the operating system automatically when the program +exits. This failsafe feature exists mainly for backward compatibility because there was a time when the global functions didn't exist. Because it diff --git a/docs/libcurl/libcurl.m4 b/docs/libcurl/libcurl.m4 index 2cf3edd..a84077a 100644 --- a/docs/libcurl/libcurl.m4 +++ b/docs/libcurl/libcurl.m4 @@ -1,24 +1,3 @@ -#*************************************************************************** -# _ _ ____ _ -# Project ___| | | | _ \| | -# / __| | | | |_) | | -# | (__| |_| | _ <| |___ -# \___|\___/|_| \_\_____| -# -# Copyright (C) 2006, David Shaw -# -# 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 http://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. -# -########################################################################### # LIBCURL_CHECK_CONFIG ([DEFAULT-ACTION], [MINIMUM-VERSION], # [ACTION-IF-YES], [ACTION-IF-NO]) # ---------------------------------------------------------- diff --git a/docs/libcurl/opts/CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3 b/docs/libcurl/opts/CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3 deleted file mode 100644 index 66ceab8..0000000 --- a/docs/libcurl/opts/CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3 +++ /dev/null @@ -1,48 +0,0 @@ -.\" ************************************************************************** -.\" * _ _ ____ _ -.\" * 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 http://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 CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE 3 "4 Nov 2014" "libcurl 7.39.0" "curl_multi_setopt options" -.SH NAME -CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE \- chunk length threshold for pipelining -.SH SYNOPSIS -#include - -CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE, long size); -.SH DESCRIPTION -Pass a long with a \fBsize\fP in bytes. If a pipelined connection is currently -processing a chunked (Transfer-encoding: chunked) request with a current chunk -length larger than \fICURLMOPT_CHUNK_LENGTH_PENALTY_SIZE(3)\fP, that pipeline -will not be considered for additional requests, even if it is shorter than -\fICURLMOPT_MAX_PIPELINE_LENGTH(3)\fP. -.SH DEFAULT -The default value is 0, which means that the penalization is inactive. -.SH PROTOCOLS -HTTP(S) -.SH EXAMPLE -TODO -.SH AVAILABILITY -Added in 7.30.0 -.SH RETURN VALUE -Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not. -.SH "SEE ALSO" -.BR CURLMOPT_PIPELINING "(3), " CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE "(3), " -.BR CURLMOPT_MAX_PIPELINE_LENGTH "(3), " diff --git a/docs/libcurl/opts/CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3 b/docs/libcurl/opts/CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3 deleted file mode 100644 index 203b6ac..0000000 --- a/docs/libcurl/opts/CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3 +++ /dev/null @@ -1,47 +0,0 @@ -.\" ************************************************************************** -.\" * _ _ ____ _ -.\" * 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 http://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 CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE 3 "4 Nov 2014" "libcurl 7.39.0" "curl_multi_setopt options" -.SH NAME -CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE \- size threshold for pipelining penalty -.SH SYNOPSIS -#include - -CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE, long size); -.SH DESCRIPTION -Pass a long with a \fBsize\fP in bytes. If a pipelined connection is currently -processing a request with a Content-Length larger than this -\fICURLMOPT_CONTENT_LENGTH_PENALTY_SIZE(3)\fP, that pipeline will then not be -considered for additional requests, even if it is shorter than -\fICURLMOPT_MAX_PIPELINE_LENGTH(3)\fP. -.SH DEFAULT -The default value is 0, which means that the size penalization is inactive. -.SH PROTOCOLS -HTTP(S) -.SH EXAMPLE -TODO -.SH AVAILABILITY -Added in 7.30.0 -.SH RETURN VALUE -Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not. -.SH "SEE ALSO" -.BR CURLMOPT_PIPELINING "(3), " CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE "(3), " diff --git a/docs/libcurl/opts/CURLMOPT_MAXCONNECTS.3 b/docs/libcurl/opts/CURLMOPT_MAXCONNECTS.3 deleted file mode 100644 index 759ce08..0000000 --- a/docs/libcurl/opts/CURLMOPT_MAXCONNECTS.3 +++ /dev/null @@ -1,62 +0,0 @@ -.\" ************************************************************************** -.\" * _ _ ____ _ -.\" * 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 http://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 CURLMOPT_MAXCONNECTS 3 "17 Jun 2014" "libcurl 7.37.0" "curl_multi_setopt options" -.SH NAME -CURLMOPT_MAXCONNECTS \- set size of connection cache -.SH SYNOPSIS -#include - -CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAXCONNECTS, long max); -.SH DESCRIPTION -Pass a long indicating the \fBmax\fP. The set number will be used as the -maximum amount of simultaneously open connections that libcurl may keep in its -connection cache after completed use. By default libcurl will enlarge the size -for each added easy handle to make it fit 4 times the number of added easy -handles. - -By setting this option, you can prevent the cache size from growing beyond the -limit set by you. - -When the cache is full, curl closes the oldest one in the cache to prevent the -number of open connections from increasing. - -This option is for the multi handle's use only, when using the easy interface -you should instead use the \fICURLOPT_MAXCONNECTS(3)\fP option. - -See \fICURLMOPT_MAX_TOTAL_CONNECTIONS(3)\fP for limiting the number of active -connections. - -.SH DEFAULT -See DESCRIPTION -.SH PROTOCOLS -All -.SH EXAMPLE -TODO -.SH AVAILABILITY -Added in 7.16.3 -.SH RETURN VALUE -Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not. -.SH "SEE ALSO" -.BR CURLMOPT_MAX_HOST_CONNECTIONS "(3), " -.BR CURLOPT_MAXCONNECTS "(3), " - diff --git a/docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.3 b/docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.3 deleted file mode 100644 index 7789347..0000000 --- a/docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.3 +++ /dev/null @@ -1,54 +0,0 @@ -.\" ************************************************************************** -.\" * _ _ ____ _ -.\" * 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 http://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 CURLMOPT_MAX_HOST_CONNECTIONS 3 "17 Jun 2014" "libcurl 7.37.0" "curl_multi_setopt options" -.SH NAME -CURLMOPT_MAX_HOST_CONNECTIONS \- set max number of connections to a single host -.SH SYNOPSIS -#include - -CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAX_HOST_CONNECTIONS, long max); -.SH DESCRIPTION -Pass a long to indicate \fBmax\fP. The set number will be used as the maximum -amount of simultaneously open connections to a single host. For each new -session to a host, libcurl will open a new connection up to the limit set by -\fICURLMOPT_MAX_HOST_CONNECTIONS(3)\fP. When the limit is reached, the -sessions will be pending until a connection becomes available. If -\fICURLMOPT_PIPELINING(3)\fP is enabled, libcurl will try to pipeline if the -host is capable of it. - -The default \fBmax\fP value is 0, unlimited. However, for backwards -compatibility, setting it to 0 when \fICURLMOPT_PIPELINING(3)\fP is 1 will not -be treated as unlimited. Instead it will open only 1 connection and try to -pipeline on it. -.SH DEFAULT -0 -.SH PROTOCOLS -HTTP(S) -.SH EXAMPLE -TODO -.SH AVAILABILITY -Added in 7.30.0 -.SH RETURN VALUE -Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not. -.SH "SEE ALSO" -.BR CURLMOPT_MAXCONNECTS "(3), " CURLMOPT_MAX_TOTAL_CONNECTIONS "(3), " diff --git a/docs/libcurl/opts/CURLMOPT_MAX_PIPELINE_LENGTH.3 b/docs/libcurl/opts/CURLMOPT_MAX_PIPELINE_LENGTH.3 deleted file mode 100644 index c2adb45..0000000 --- a/docs/libcurl/opts/CURLMOPT_MAX_PIPELINE_LENGTH.3 +++ /dev/null @@ -1,51 +0,0 @@ -.\" ************************************************************************** -.\" * _ _ ____ _ -.\" * 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 http://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 CURLMOPT_MAX_PIPELINE_LENGTH 3 "4 Nov 2014" "libcurl 7.39.0" "curl_multi_setopt options" -.SH NAME -CURLMOPT_MAX_PIPELINE_LENGTH \- maximum number of requests in a pipeline -.SH SYNOPSIS -#include - -CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAX_PIPELINE_LENGTH, long max); -.SH DESCRIPTION -Pass a long. The set \fBmax\fP number will be used as the maximum amount of -outstanding requests in a pipelined connection. Only used if pipelining is -enabled. - -When this limit is reached, libcurl will use another connection to the same -host (see \fICURLMOPT_MAX_HOST_CONNECTIONS(3)\fP), or queue the request until -one of the pipelines to the host is ready to accept a request. Thus, the -total number of requests in-flight is \fICURLMOPT_MAX_HOST_CONNECTIONS(3)\fP * -\fICURLMOPT_MAX_PIPELINE_LENGTH(3)\fP. -.SH DEFAULT -5 -.SH PROTOCOLS -HTTP(S) -.SH EXAMPLE -TODO -.SH AVAILABILITY -Added in 7.30.0 -.SH RETURN VALUE -Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not. -.SH "SEE ALSO" -.BR CURLMOPT_PIPELINING "(3), " CURLMOPT_MAX_HOST_CONNECTIONS "(3), " diff --git a/docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3 b/docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3 deleted file mode 100644 index 2783a7d..0000000 --- a/docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3 +++ /dev/null @@ -1,50 +0,0 @@ -.\" ************************************************************************** -.\" * _ _ ____ _ -.\" * 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 http://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 CURLMOPT_MAX_TOTAL_CONNECTIONS 3 "4 Nov 2014" "libcurl 7.39.0" "curl_multi_setopt options" -.SH NAME -CURLMOPT_MAX_TOTAL_CONNECTIONS \- max simultaneously open connections -.SH SYNOPSIS -#include - -CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAX_TOTAL_CONNECTIONS, long amount); -.SH DESCRIPTION -Pass a long for the \fBamount\fP. The set number will be used as the maximum -number of simultaneously open connections in total using this multi -handle. For each new session, libcurl will open a new connection up to the -limit set by \fICURLMOPT_MAX_TOTAL_CONNECTIONS(3)\fP. When the limit is -reached, the sessions will be pending until there are available -connections. If \fICURLMOPT_PIPELINING(3)\fP is enabled, libcurl will try to -pipeline if the host is capable of it. -.SH DEFAULT -The default value is 0, which means that there is no limit. It is then simply -controlled by the number of easy handles added. -.SH PROTOCOLS -All -.SH EXAMPLE -TODO -.SH AVAILABILITY -Added in 7.30.0 -.SH RETURN VALUE -Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not. -.SH "SEE ALSO" -.BR CURLMOPT_MAXCONNECTS "(3), " CURLMOPT_MAX_HOST_CONNECTIONS "(3), " diff --git a/docs/libcurl/opts/CURLMOPT_PIPELINING.3 b/docs/libcurl/opts/CURLMOPT_PIPELINING.3 deleted file mode 100644 index c1df1d5..0000000 --- a/docs/libcurl/opts/CURLMOPT_PIPELINING.3 +++ /dev/null @@ -1,57 +0,0 @@ -.\" ************************************************************************** -.\" * _ _ ____ _ -.\" * 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 http://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 CURLMOPT_PIPELINING 3 "17 Jun 2014" "libcurl 7.37.0" "curl_multi_setopt options" -.SH NAME -CURLMOPT_PIPELINING \- enable/disable HTTP pipelining -.SH SYNOPSIS -#include - -CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_PIPELINING, bool onoff); -.SH DESCRIPTION -Set the \fBonoff\fP parameter to 1 to make libcurl use HTTP pipelining for -HTTP transfers done using this multi handle, as far as possible. This means -that if you add a second request that can use an already existing connection, -the second request will be \&"piped" on the same connection rather than being -executed in parallel. - -When using pipelining, there are also several other related options that are -interesting to tweak and adjust to alter how libcurl spreads out requests on -different connections or not etc. -.SH DEFAULT -0 (off) -.SH PROTOCOLS -HTTP(S) -.SH EXAMPLE -TODO -.SH AVAILABILITY -Added in 7.16.0 -.SH RETURN VALUE -Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not. -.SH "SEE ALSO" -.BR CURLMOPT_MAX_PIPELINE_LENGTH "(3), " -.BR CURLMOPT_PIPELINING_SITE_BL "(3), " -.BR CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE "(3), " -.BR CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE "(3), " -.BR CURLMOPT_MAX_HOST_CONNECTIONS "(3), " -.BR CURLMOPT_MAXCONNECTS "(3), " -.BR CURLMOPT_MAX_HOST_CONNECTIONS "(3), " diff --git a/docs/libcurl/opts/CURLMOPT_PIPELINING_SERVER_BL.3 b/docs/libcurl/opts/CURLMOPT_PIPELINING_SERVER_BL.3 deleted file mode 100644 index ae39312..0000000 --- a/docs/libcurl/opts/CURLMOPT_PIPELINING_SERVER_BL.3 +++ /dev/null @@ -1,60 +0,0 @@ -.\" ************************************************************************** -.\" * _ _ ____ _ -.\" * 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 http://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 CURLMOPT_PIPELINING_SERVER_BL 3 "4 Nov 2014" "libcurl 7.39.0" "curl_multi_setopt options" -.SH NAME -CURLMOPT_PIPELINING_SERVER_BL \- pipelining server blacklist -.SH SYNOPSIS -#include - -CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_PIPELINING_SERVER_BL, char **servers); -.SH DESCRIPTION -Pass a \fBservers\fP array of char *, ending with a NULL entry. This is a list -of server types prefixes (in the Server: HTTP header) that are blacklisted -from pipelining, i.e server types that are known to not support HTTP -pipelining. The array is copied by libcurl. - -Note that the comparison matches if the Server: header begins with the string -in the blacklist, i.e "Server: Ninja 1.2.3" and "Server: Ninja 1.4.0" can -both be blacklisted by having "Ninja" in the backlist. - -Pass a NULL pointer to clear the blacklist. -.SH DEFAULT -The default value is NULL, which means that there is no blacklist. -.SH PROTOCOLS -.SH EXAMPLE -.nf - server_blacklist[] = - { - "Microsoft-IIS/6.0", - "nginx/0.8.54", - NULL - }; - - curl_multi_setopt(m, CURLMOPT_PIPELINE_SERVER_BL, server_blacklist); -.fi -.SH AVAILABILITY -Added in 7.30.0 -.SH RETURN VALUE -Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not. -.SH "SEE ALSO" -.BR CURLMOPT_PIPELINING "(3), " CURLMOPT_PIPELINING_SITE_BL "(3), " diff --git a/docs/libcurl/opts/CURLMOPT_PIPELINING_SITE_BL.3 b/docs/libcurl/opts/CURLMOPT_PIPELINING_SITE_BL.3 deleted file mode 100644 index 6356d02..0000000 --- a/docs/libcurl/opts/CURLMOPT_PIPELINING_SITE_BL.3 +++ /dev/null @@ -1,56 +0,0 @@ -.\" ************************************************************************** -.\" * _ _ ____ _ -.\" * 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 http://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 CURLMOPT_PIPELINING_SITE_BL 3 "4 Nov 2014" "libcurl 7.39.0" "curl_multi_setopt options" -.SH NAME -CURLMOPT_PIPELINING_SITE_BL \- pipelining host blacklist -.SH SYNOPSIS -#include - -CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_PIPELINING_SITE_BL, char **hosts); -.SH DESCRIPTION -Pass a \fBhosts\fP array of char *, ending with a NULL entry. This is a list -of sites that are blacklisted from pipelining, i.e sites that are known to not -support HTTP pipelining. The array is copied by libcurl. - -Pass a NULL pointer to clear the blacklist. -.SH DEFAULT -The default value is NULL, which means that there is no blacklist. -.SH PROTOCOLS -HTTP(S) -.SH EXAMPLE -.nf - site_blacklist[] = - { - "www.haxx.se", - "www.example.com:1234", - NULL - }; - - curl_multi_setopt(m, CURLMOPT_PIPELINE_SITE_BL, site_blacklist); -.fi -.SH AVAILABILITY -Added in 7.30.0 -.SH RETURN VALUE -Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not. -.SH "SEE ALSO" -.BR CURLMOPT_PIPELINING "(3), " CURLMOPT_PIPELINING_SERVER_BL "(3), " diff --git a/docs/libcurl/opts/CURLMOPT_SOCKETDATA.3 b/docs/libcurl/opts/CURLMOPT_SOCKETDATA.3 deleted file mode 100644 index bf7e6a7..0000000 --- a/docs/libcurl/opts/CURLMOPT_SOCKETDATA.3 +++ /dev/null @@ -1,49 +0,0 @@ -.\" ************************************************************************** -.\" * _ _ ____ _ -.\" * 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 http://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 CURLMOPT_SOCKETDATA 3 "3 Nov 2014" "libcurl 7.39.0" "curl_multi_setopt options" -.SH NAME -CURLMOPT_SOCKETDATA \- custom pointer passed to the socket callback -.SH SYNOPSIS -.nf -#include - -CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_SOCKETDATA, void *pointer); -.SH DESCRIPTION -A data \fIpointer\fP to pass to the socket callback set with the -\fICURLMOPT_SOCKETFUNCTION(3)\fP option. - -This pointer will not be touched by libcurl but will only be passed in to the -socket callbacks's \fBuserp\fP argument. -.SH DEFAULT -NULL -.SH PROTOCOLS -All -.SH EXAMPLE -TODO -.SH AVAILABILITY -Added in 7.15.4 -.SH RETURN VALUE -Returns CURLM_OK. -.SH "SEE ALSO" -.BR CURLMOPT_SOCKETFUNCTION "(3), " curl_multi_socket_action "(3), " -.BR CURLMOPT_TIMERFUNCTION "(3) " diff --git a/docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3 b/docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3 deleted file mode 100644 index d64fe11..0000000 --- a/docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3 +++ /dev/null @@ -1,62 +0,0 @@ -.\" ************************************************************************** -.\" * _ _ ____ _ -.\" * 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 http://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 CURLMOPT_SOCKETFUNCTION 3 "3 Nov 2014" "libcurl 7.39.0" "curl_multi_setopt options" -.SH NAME -CURLMOPT_SOCKETFUNCTION \- callback informed about what to wait for -.SH SYNOPSIS -.nf -#include - -int socket_callback(CURL *easy, /* easy handle */ - curl_socket_t s, /* socket */ - int what, /* see above */ - void *userp, /* private callback pointer */ - void *socketp); /* private socket pointer */ - -CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_SOCKETFUNCTION, socket_callback); -.SH DESCRIPTION -Pass a pointer to your callback function, which should match the prototype -shown above. - -When the \fIcurl_multi_socket_action(3)\fP function runs, it informs the -application about updates in the socket (file descriptor) status by doing -none, one, or multiple calls to the \fBsocket_callback\fP. The callback gets -status updates with changes since the previous time the callback was called. -If the given callback pointer is NULL, no callback will be called. Set the -callback's \fBuserp\fP argument with \fICURLMOPT_SOCKETDATA(3)\fP. See -\fIcurl_multi_socket_action(3)\fP for more details on how the callback is used -and should work. -.SH DEFAULT -NULL (no callback) -.SH PROTOCOLS -All -.SH EXAMPLE -TODO -.SH AVAILABILITY -Added in 7.15.4 -.SH RETURN VALUE -Returns CURLM_OK. -.SH "SEE ALSO" -.BR CURLMOPT_SOCKETDATA "(3), " curl_multi_socket_action "(3), " -.BR CURLMOPT_TIMERFUNCTION "(3) " - diff --git a/docs/libcurl/opts/CURLMOPT_TIMERDATA.3 b/docs/libcurl/opts/CURLMOPT_TIMERDATA.3 deleted file mode 100644 index 41627da..0000000 --- a/docs/libcurl/opts/CURLMOPT_TIMERDATA.3 +++ /dev/null @@ -1,48 +0,0 @@ -.\" ************************************************************************** -.\" * _ _ ____ _ -.\" * 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 http://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 CURLMOPT_TIMERDATA 3 "17 Jun 2014" "libcurl 7.37.0" "curl_multi_setopt options" -.SH NAME -CURLMOPT_TIMERDATA \- custom pointer to pass to timer callback -.SH SYNOPSIS -.nf -#include - -CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_TIMERDATA, void *pointer); -.SH DESCRIPTION -A data \fBpointer\fP to pass to the timer callback set with the -\fICURLMOPT_TIMERFUNCTION(3)\fP option. - -This pointer will not be touched by libcurl but will only be passed in to the -timer callbacks's \fBuserp\fP argument. -.SH DEFAULT -NULL -.SH PROTOCOLS -All -.SH EXAMPLE -TODO -.SH AVAILABILITY -Added in 7.16.0 -.SH RETURN VALUE -Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not. -.SH "SEE ALSO" -.BR CURLMOPT_TIMERFUNCTION "(3), " CURLMOPT_SOCKETFUNCTION "(3), " diff --git a/docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3 b/docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3 deleted file mode 100644 index 809c3ef..0000000 --- a/docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3 +++ /dev/null @@ -1,63 +0,0 @@ -.\" ************************************************************************** -.\" * _ _ ____ _ -.\" * 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 http://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 CURLMOPT_TIMERFUNCTION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_multi_setopt options" -.SH NAME -CURLMOPT_TIMERFUNCTION \- set callback to receive timeout values -.SH SYNOPSIS -.nf -#include - -int timer_callback(CURLM *multi, /* multi handle */ - long timeout_ms, /* see above */ - void *userp); /* private callback pointer */ - -CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_TIMERFUNCTION, timer_callback); -.SH DESCRIPTION -Pass a pointer to your callback function, which should match the prototype -shown above. - -This callback function will be called when the timeout value changes. The -\fBtimeout_ms\fP value is at what latest time the application should call one -of the \&"performing" functions of the multi interface -(\fIcurl_multi_socket_action(3)\fP and \fIcurl_multi_perform(3)\fP) - to allow -libcurl to keep timeouts and retries etc to work. A \fBtimeout_ms\fP value of --1 means that there is no timeout at all, and 0 means that the timeout is -already expired. libcurl attempts to limit calling this only when the fixed -future timeout time actually changes. - -The \fBuserp\fP pointer is set with \fICURLMOPT_TIMERDATA(3)\fP. - -The timer callback should return 0 on success, and -1 on error. This callback -can be used instead of, or in addition to, \fIcurl_multi_timeout(3)\fP. -.SH DEFAULT -NULL -.SH PROTOCOLS -All -.SH EXAMPLE -TODO -.SH AVAILABILITY -Added in 7.16.0 -.SH RETURN VALUE -Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not. -.SH "SEE ALSO" -.BR CURLMOPT_TIMERDATA "(3), " CURLMOPT_SOCKETFUNCTION "(3), " diff --git a/docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.3 b/docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.3 index 376799a..eaee975 100644 --- a/docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.3 +++ b/docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.3 @@ -60,4 +60,3 @@ 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_TRANSFER_ENCODING "(3), " CURLOPT_HTTPHEADER "(3), " -.BR CURLOPT_HTTP_CONTENT_DECODING "(3), " diff --git a/docs/libcurl/opts/CURLOPT_CAINFO.3 b/docs/libcurl/opts/CURLOPT_CAINFO.3 index cb7f47b..1f2dfc4 100644 --- a/docs/libcurl/opts/CURLOPT_CAINFO.3 +++ b/docs/libcurl/opts/CURLOPT_CAINFO.3 @@ -52,5 +52,4 @@ If built TLS enabled 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_CAPATH "(3), " .BR CURLOPT_SSL_VERIFYPEER "(3), " CURLOPT_SSL_VERIFYHOST "(3), " diff --git a/docs/libcurl/opts/CURLOPT_CAPATH.3 b/docs/libcurl/opts/CURLOPT_CAPATH.3 index 642953d..1edfbcd 100644 --- a/docs/libcurl/opts/CURLOPT_CAPATH.3 +++ b/docs/libcurl/opts/CURLOPT_CAPATH.3 @@ -32,10 +32,10 @@ Pass a char * to a zero terminated string naming a directory holding multiple CA certificates to verify the peer with. If libcurl is built against OpenSSL, the certificate directory must be prepared using the openssl c_rehash utility. This makes sense only when used in combination with the -\fICURLOPT_SSL_VERIFYPEER(3)\fP option. - -The \fICURLOPT_CAPATH(3)\fP function apparently does not work in Windows due -to some limitation in openssl. +\fICURLOPT_SSL_VERIFYPEER(3)\fP option. If \fICURLOPT_SSL_VERIFYPEER(3)\fP is +zero, \fICURLOPT_CAPATH(3)\fP need not even indicate an accessible path. The +\fICURLOPT_CAPATH(3)\fP function apparently does not work in Windows due to +some limitation in openssl. .SH DEFAULT NULL .SH PROTOCOLS @@ -50,5 +50,4 @@ compatibility. Returns CURLE_OK if TLS enabled, and CURLE_UNKNOWN_OPTION if not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space. .SH "SEE ALSO" -.BR CURLOPT_CAINFO "(3), " .BR CURLOPT_STDERR "(3), " CURLOPT_DEBUGFUNCTION "(3), " diff --git a/docs/libcurl/opts/CURLOPT_CERTINFO.3 b/docs/libcurl/opts/CURLOPT_CERTINFO.3 index 8c01711..44141da 100644 --- a/docs/libcurl/opts/CURLOPT_CERTINFO.3 +++ b/docs/libcurl/opts/CURLOPT_CERTINFO.3 @@ -29,7 +29,7 @@ CURLOPT_CERTINFO \- request SSL certificate information CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CERTINFO, long certinfo); .SH DESCRIPTION Pass a long set to 1 to enable libcurl's certificate chain info gatherer. With -this enabled, libcurl (if built with OpenSSL, NSS or GSKit) will +this enabled, libcurl (if built with OpenSSL, NSS, GSKit or QsoSSL) will extract lots of information and data about the certificates in the certificate chain used in the SSL connection. This data may then be retrieved after a transfer using \fIcurl_easy_getinfo(3)\fP and its option diff --git a/docs/libcurl/opts/CURLOPT_CHUNK_BGN_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_CHUNK_BGN_FUNCTION.3 index 4dd7907..ecf026a 100644 --- a/docs/libcurl/opts/CURLOPT_CHUNK_BGN_FUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_CHUNK_BGN_FUNCTION.3 @@ -40,7 +40,7 @@ This callback function gets called by libcurl before a part of the stream is going to be transferred (if the transfer supports chunks). The \fItransfer_info\fP pointer will point to a struct curl_fileinfo with -details about the file that is about to get transferred. +details about the file that is about to get transfered. This callback makes sense only when using the \fICURLOPT_WILDCARDMATCH(3)\fP option for now. diff --git a/docs/libcurl/opts/CURLOPT_CONNECT_ONLY.3 b/docs/libcurl/opts/CURLOPT_CONNECT_ONLY.3 index afb3cfd..7a602aa 100644 --- a/docs/libcurl/opts/CURLOPT_CONNECT_ONLY.3 +++ b/docs/libcurl/opts/CURLOPT_CONNECT_ONLY.3 @@ -30,7 +30,7 @@ CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CONNECT_ONLY, long only); .SH DESCRIPTION Pass a long. If the parameter equals 1, it tells the library to perform all the required proxy authentication and connection setup, but no data transfer, -and then return. +and then return. This option is implemented for HTTP, SMTP and POP3. The option can be used to simply test a connection to a server, but is more useful when used with the \fICURLINFO_LASTSOCKET\fP option to @@ -40,7 +40,7 @@ transfers. .SH DEFAULT 0 .SH PROTOCOLS -HTTP, SMTP, POP3 and IMAP +HTTP, SMTP and POP3 .SH EXAMPLE TODO .SH AVAILABILITY diff --git a/docs/libcurl/opts/CURLOPT_COOKIE.3 b/docs/libcurl/opts/CURLOPT_COOKIE.3 index 379296a..824e985 100644 --- a/docs/libcurl/opts/CURLOPT_COOKIE.3 +++ b/docs/libcurl/opts/CURLOPT_COOKIE.3 @@ -58,5 +58,5 @@ If HTTP is enabled Returns CURLE_OK if HTTP is enabled, CURLE_UNKNOWN_OPTION if not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space. .SH "SEE ALSO" -.BR CURLOPT_COOKIEFILE "(3), " CURLOPT_COOKIEJAR "(3), " CURLOPT_COOKIELIST "(3), " +.BR CURLOPT_COOKIEFILE "(3), " CURLOPT_COOKIEJAR "(3), " .BR CURLOPT_HTTPHEADER "(3), " diff --git a/docs/libcurl/opts/CURLOPT_COOKIEJAR.3 b/docs/libcurl/opts/CURLOPT_COOKIEJAR.3 index 936d4d8..fd8c0af 100644 --- a/docs/libcurl/opts/CURLOPT_COOKIEJAR.3 +++ b/docs/libcurl/opts/CURLOPT_COOKIEJAR.3 @@ -55,4 +55,4 @@ Along with HTTP Returns CURLE_OK if HTTP is supported, CURLE_UNKNOWN_OPTION if not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space. .SH "SEE ALSO" -.BR CURLOPT_COOKIEFILE "(3), " CURLOPT_COOKIE "(3), " CURLOPT_COOKIELIST "(3), " +.BR CURLOPT_COOKIEFILE "(3), " CURLOPT_COOKIE "(3), " diff --git a/docs/libcurl/opts/CURLOPT_COOKIELIST.3 b/docs/libcurl/opts/CURLOPT_COOKIELIST.3 index 815def1..1237959 100644 --- a/docs/libcurl/opts/CURLOPT_COOKIELIST.3 +++ b/docs/libcurl/opts/CURLOPT_COOKIELIST.3 @@ -46,10 +46,6 @@ erases all session cookies held in memory .IP FLUSH writes all known cookies to the file specified by \fICURLOPT_COOKIEJAR(3)\fP - -.IP RELOAD -loads all cookies from the files specified by \fICURLOPT_COOKIEFILE(3)\fP - .SH DEFAULT NULL .SH PROTOCOLS @@ -62,10 +58,8 @@ ALL was added in 7.14.1 SESS was added in 7.15.4 FLUSH was added in 7.17.1 - -RELOAD was added in 7.39.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_COOKIEFILE "(3), " CURLOPT_COOKIEJAR "(3), " CURLOPT_COOKIE "(3), " +.BR CURLOPT_COOKIEFILE "(3), " CURLOPT_COOKIEJAR "(3), " diff --git a/docs/libcurl/opts/CURLOPT_COPYPOSTFIELDS.3 b/docs/libcurl/opts/CURLOPT_COPYPOSTFIELDS.3 index d35aebd..35ae3ef 100644 --- a/docs/libcurl/opts/CURLOPT_COPYPOSTFIELDS.3 +++ b/docs/libcurl/opts/CURLOPT_COPYPOSTFIELDS.3 @@ -28,10 +28,10 @@ CURLOPT_COPYPOSTFIELDS \- have libcurl copy data to POST CURLcode curl_easy_setopt(CURL *handle, CURLOPT_COPYPOSTFIELDS, char *data); .SH DESCRIPTION -Pass a char * as parameter, which should be the full \fIdata\fP to post in a -HTTP POST operation. It behaves as the \fICURLOPT_POSTFIELDS(3)\fP option, but -the original data is instead copied by the library, allowing the application -to overwrite the original data after setting this option. +Pass a char * as parameter, which should be the full data to post in a HTTP +POST operation. It behaves as the \fICURLOPT_POSTFIELDS(3)\fP option, but the +original data is instead copied by the library, allowing the application to +overwrite the original data after setting this option. Because data are copied, care must be taken when using this option in conjunction with \fICURLOPT_POSTFIELDSIZE(3)\fP or @@ -44,23 +44,9 @@ copy. In any case, the size must not be changed after .SH DEFAULT NULL .SH PROTOCOLS -HTTP(S) +HTTP .SH EXAMPLE -.nf -CURL *curl = curl_easy_init(); -if(curl) { - char local_buffer[1024]="data to send"; - curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); - - /* size of the data to copy from the buffer and send in the request */ - curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 12L); - - /* send data from the local stack */ - curl_easy_setopt(curl, CURLOPT_COPYPOSTFIELDS, local_buffer); - - curl_easy_perform(curl); -} -.fi +TODO .SH AVAILABILITY Added in 7.17.1 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_CRLF.3 b/docs/libcurl/opts/CURLOPT_CRLF.3 index 32d8b79..68919ef 100644 --- a/docs/libcurl/opts/CURLOPT_CRLF.3 +++ b/docs/libcurl/opts/CURLOPT_CRLF.3 @@ -40,7 +40,7 @@ All .SH EXAMPLE TODO .SH AVAILABILITY -SMTP since 7.40.0, other protocols since they were introduced +Always .SH RETURN VALUE Returns CURLE_OK .SH "SEE ALSO" diff --git a/docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.3 b/docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.3 index fd33118..2e6ec0c 100644 --- a/docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.3 +++ b/docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.3 @@ -83,7 +83,7 @@ issue NOOP and RSET commands. .SH DEFAULT NULL .SH PROTOCOLS -HTTP, FTP, IMAP, POP3 and SMTP +HTTP, FTP, IMAP, POP3 .SH EXAMPLE TODO .SH AVAILABILITY diff --git a/docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.3 b/docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.3 index 6c4721b..984e394 100644 --- a/docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.3 @@ -79,103 +79,7 @@ NULL .SH PROTOCOLS All .SH EXAMPLE -.nf -static -void dump(const char *text, - FILE *stream, unsigned char *ptr, size_t size) -{ - size_t i; - size_t c; - unsigned int width=0x10; - - 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]:'.', stream); - - fputc('\n', stream); /* newline */ - } -} - -static -int my_trace(CURL *handle, curl_infotype type, - char *data, size_t size, - void *userp) -{ - const char *text; - (void)handle; /* prevent compiler warning */ - - switch (type) { - case CURLINFO_TEXT: - fprintf(stderr, "== Info: %s", data); - default: /* in case a new one is introduced to shock us */ - return 0; - - case CURLINFO_HEADER_OUT: - text = "=> Send header"; - break; - case CURLINFO_DATA_OUT: - text = "=> Send data"; - break; - case CURLINFO_SSL_DATA_OUT: - text = "=> Send SSL data"; - break; - case CURLINFO_HEADER_IN: - text = "<= Recv header"; - break; - case CURLINFO_DATA_IN: - text = "<= Recv data"; - break; - case CURLINFO_SSL_DATA_IN: - text = "<= Recv SSL data"; - break; - } - - dump(text, stderr, (unsigned char *)data, size); - return 0; -} - -int main(void) -{ - CURL *curl; - CURLcode res; - - curl = curl_easy_init(); - if(curl) { - curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, my_trace); - - /* the DEBUGFUNCTION has no effect until we enable VERBOSE */ - curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); - - /* example.com is redirected, so we tell libcurl to follow redirection */ - curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); - - curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/"); - 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); - } - return 0; -} -.fi +http://curl.haxx.se/libcurl/c/debug.html .SH AVAILABILITY Always .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_DIRLISTONLY.3 b/docs/libcurl/opts/CURLOPT_DIRLISTONLY.3 index a81f907..ef41d5c 100644 --- a/docs/libcurl/opts/CURLOPT_DIRLISTONLY.3 +++ b/docs/libcurl/opts/CURLOPT_DIRLISTONLY.3 @@ -28,18 +28,13 @@ CURLOPT_DIRLISTONLY \- ask for names only in a directory listing CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DIRLISTONLY, long listonly); .SH DESCRIPTION -For FTP and SFTP based URLs a parameter set to 1 tells the library to list the -names of files in a directory, rather than performing a full directory listing -that would normally include file sizes, dates etc. +A parameter set to 1 tells the library to just list the names of files in a +directory, instead of doing a full directory listing that would include file +sizes, dates etc. This works for FTP and SFTP URLs. -For POP3 a parameter of 1 tells the library to list the email message or -messages on the POP3 server. This can be used to change the default behaviour -of libcurl, when combined with a URL that contains a message ID, to perform a -"scan listing" which can then be used to determine the size of an email. - -Note: For FTP this causes a NLST command to be sent to the FTP server. Beware -that some FTP servers list only files in their response to NLST; they might not -include subdirectories and symbolic links. +This causes an FTP NLST command to be sent on an FTP server. Beware that some +FTP servers list only files in their response to NLST; they might not include +subdirectories and symbolic links. Setting this option to 1 also implies a directory listing even if the URL doesn't end with a slash, which otherwise is necessary. @@ -49,12 +44,11 @@ will effectively break that feature then. .SH DEFAULT 0, disabled .SH PROTOCOLS -FTP, SFTP and POP3 +FTP and SFTP .SH EXAMPLE TODO .SH AVAILABILITY -This option was known as CURLOPT_FTPLISTONLY up to 7.16.4. POP3 is supported -since 7.21.5. +This option was known as CURLOPT_FTPLISTONLY up to 7.16.4 .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_ERRORBUFFER.3 b/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3 index 577202c..d743723 100644 --- a/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3 +++ b/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3 @@ -48,25 +48,10 @@ NULL .SH PROTOCOLS All .SH EXAMPLE -.nf -curl = curl_easy_init(); -if(curl) { - char error[CURL_ERROR_SIZE] - - curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); - - /* provide a buffer to store errors in */ - curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, error); - - /* Perform the request */ - curl_easy_perform(curl); -} -.fi +TODO .SH AVAILABILITY Always .SH RETURN VALUE Returns CURLE_OK .SH "SEE ALSO" .BR CURLOPT_DEBUGFUNCTION "(3), " CURLOPT_VERBOSE "(3), " -.BR curl_easy_strerror "(3), " curl_multi_strerror "(3), " -.BR curl_share_strerror "(3) " diff --git a/docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.3 b/docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.3 index 3a32cae..8885141 100644 --- a/docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.3 +++ b/docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.3 @@ -39,32 +39,15 @@ redirects libcurl will follow. libcurl can limit to what protocols it will automatically follow. The accepted protocols are set with \fICURLOPT_REDIR_PROTOCOLS(3)\fP and it excludes the FILE protocol by default. - -For users who think the existing location following is too naive, too simple -or just lacks features, it is very easy to instead implement your own redirect -follow logic with the use of \fIcurl_easy_getinfo(3)\fP's -\fICURLINFO_REDIRECT_URL\fP option instead of using -\fICURLOPT_FOLLOWLOCATION(3)\fP. .SH DEFAULT 0, disabled .SH PROTOCOLS -HTTP(S) +HTTP .SH EXAMPLE -.nf -CURL *curl = curl_easy_init(); -if(curl) { - curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); - - /* example.com is redirected, so we tell libcurl to follow redirection */ - curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); - - curl_easy_perform(curl); -} -.fi +TODO .SH AVAILABILITY Along with HTTP .SH RETURN VALUE Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not. .SH "SEE ALSO" .BR CURLOPT_REDIR_PROTOCOLS "(3), " CURLOPT_PROTOCOLS "(3), " -.BR CURLOPT_POSTREDIR "(3), " diff --git a/docs/libcurl/opts/CURLOPT_FTPSSLAUTH.3 b/docs/libcurl/opts/CURLOPT_FTPSSLAUTH.3 index bfbea9c..eaf81c9 100644 --- a/docs/libcurl/opts/CURLOPT_FTPSSLAUTH.3 +++ b/docs/libcurl/opts/CURLOPT_FTPSSLAUTH.3 @@ -22,7 +22,7 @@ .\" .TH CURLOPT_FTPSSLAUTH 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" .SH NAME -CURLOPT_FTPSSLAUTH \- set order in which to attempt TLS vs SSL when using FTP +CURLOPT_FTPSSLAUTH \- set order to attemp TSL vs SSL when using FTP .SH SYNOPSIS #include diff --git a/docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.3 b/docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.3 index 13f3cec..745742a 100644 --- a/docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.3 +++ b/docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.3 @@ -32,7 +32,7 @@ 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 +case this feature is supported by the GSSAPI implementation and the definition of GSS_C_DELEG_POLICY_FLAG was available at compile-time. .SH DEFAULT CURLGSSAPI_DELEGATION_NONE diff --git a/docs/libcurl/opts/CURLOPT_HEADEROPT.3 b/docs/libcurl/opts/CURLOPT_HEADEROPT.3 index 7776b92..ca8946c 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 - 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 @@ -31,20 +31,20 @@ CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HEADEROPT, long bitmask); Pass a long that is a bitmask of options of how to deal with headers. The two mutually exclusive options are: -\fBCURLHEADER_UNIFIED\fP - the headers specified in -\fICURLOPT_HTTPHEADER(3)\fP will be used in requests both to servers and -proxies. With this option enabled, \fICURLOPT_PROXYHEADER(3)\fP will not have -any effect. +\fBCURLHEADER_UNIFIED\fP - keep working as before. This means +\fICURLOPT_HTTPHEADER(3)\fP headers will be used in requests both to servers +and proxies. With this option enabled, \fICURLOPT_PROXYHEADER(3)\fP will not +have any effect. \fBCURLHEADER_SEPARATE\fP - makes \fICURLOPT_HTTPHEADER(3)\fP headers only get sent to a server and not to a proxy. Proxy headers must be set with \fICURLOPT_PROXYHEADER(3)\fP to get used. Note that if a non-CONNECT request is sent to a proxy, libcurl will send both server headers and proxy headers. When doing CONNECT, libcurl will send \fICURLOPT_PROXYHEADER(3)\fP -headers only to the proxy and then \fICURLOPT_HTTPHEADER(3)\fP headers only to +headers only do the proxy and then \fICURLOPT_HTTPHEADER(3)\fP headers only to the server. .SH DEFAULT -CURLHEADER_SEPARATE (changed in 7.42.1, ased CURLHEADER_UNIFIED before then) +CURLHEADER_UNIFIED .SH PROTOCOLS HTTP .SH EXAMPLE diff --git a/docs/libcurl/opts/CURLOPT_HTTPAUTH.3 b/docs/libcurl/opts/CURLOPT_HTTPAUTH.3 index 35d75aa..3f0ab12 100644 --- a/docs/libcurl/opts/CURLOPT_HTTPAUTH.3 +++ b/docs/libcurl/opts/CURLOPT_HTTPAUTH.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_HTTPAUTH 3 "2 Aug 2014" "libcurl 7.38.0" "curl_easy_setopt options" +.TH CURLOPT_HTTPAUTH 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" .SH NAME CURLOPT_HTTPAUTH \- set HTTP server authentication methods to try .SH SYNOPSIS @@ -56,12 +56,14 @@ defined in RFC2617 and is a more secure way to do authentication over public networks than the regular old-fashioned Basic method. The IE flavor is simply that libcurl will use a special "quirk" that IE is known to have used before version 7 and that some servers require the client to use. -.IP CURLAUTH_NEGOTIATE -HTTP Negotiate (SPNEGO) authentication. Negotiate authentication is defined -in RFC 4559 and is the most secure way to perform authentication over HTTP. +.IP CURLAUTH_GSSNEGOTIATE +HTTP GSS-Negotiate authentication. The GSS-Negotiate (also known as plain +\&"Negotiate") method was designed by Microsoft and is used in their web +applications. It is primarily meant as a support for Kerberos5 authentication +but may also be used along with other authentication methods. For more +information see IETF draft draft-brezak-spnego-http-04.txt. -You need to build libcurl with a suitable GSS-API library or SSPI on Windows -for this to work. +You need to build libcurl with a suitable GSS-API library for this to work. .IP CURLAUTH_NTLM HTTP NTLM authentication. A proprietary protocol invented and used by Microsoft. It uses a challenge-response and hash concept similar to Digest, to diff --git a/docs/libcurl/opts/CURLOPT_HTTPGET.3 b/docs/libcurl/opts/CURLOPT_HTTPGET.3 index c14c387..1e3e566 100644 --- a/docs/libcurl/opts/CURLOPT_HTTPGET.3 +++ b/docs/libcurl/opts/CURLOPT_HTTPGET.3 @@ -37,20 +37,9 @@ When setting \fICURLOPT_HTTPGET(3)\fP to 1, it will automatically set .SH DEFAULT 0 .SH PROTOCOLS -HTTP(S) +HTTP .SH EXAMPLE -.nf -curl = curl_easy_init(); -if(curl) { - curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); - - /* use a GET to fetch this */ - curl_easy_setopt(curl, CURLOPT_HTTPGET, 1L); - - /* Perform the request */ - curl_easy_perform(curl); -} -.fi +TODO .SH AVAILABILITY Along with HTTP .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_HTTPHEADER.3 b/docs/libcurl/opts/CURLOPT_HTTPHEADER.3 index 10fcf08..557f9fb 100644 --- a/docs/libcurl/opts/CURLOPT_HTTPHEADER.3 +++ b/docs/libcurl/opts/CURLOPT_HTTPHEADER.3 @@ -54,11 +54,6 @@ following the request-line are headers. Adding this method line in this list of headers will only cause your request to send an invalid header. Use \fICURLOPT_CUSTOMREQUEST(3)\fP to change the method. -When this option is passed to \fIcurl_easy_setopt(3)\fP, libcurl will not copy -the entire list so you \fBmust\fP keep it around until you no longer use this -\fIhandle\fP for a transfer before you call \fIcurl_slist_free_all(3)\fP on -the list. - Pass a NULL to this option to reset back to no custom headers. The most commonly replaced headers have "shortcuts" in the options diff --git a/docs/libcurl/opts/CURLOPT_HTTPPOST.3 b/docs/libcurl/opts/CURLOPT_HTTPPOST.3 index 0f35b63..b39e8f7 100644 --- a/docs/libcurl/opts/CURLOPT_HTTPPOST.3 +++ b/docs/libcurl/opts/CURLOPT_HTTPPOST.3 @@ -47,29 +47,7 @@ NULL .SH PROTOCOLS HTTP .SH EXAMPLE -.nf -/* 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); -.fi +TODO .SH AVAILABILITY As long as HTTP is enabled .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.3 b/docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.3 index 65472ec..56008c2 100644 --- a/docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.3 +++ b/docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.3 @@ -46,4 +46,3 @@ Added in 7.16.2 Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. .SH "SEE ALSO" .BR CURLOPT_STDERR "(3), " CURLOPT_DEBUGFUNCTION "(3), " -.BR CURLOPT_ACCEPT_ENCODING "(3) " diff --git a/docs/libcurl/opts/CURLOPT_IOCTLFUNCTION.3 b/docs/libcurl/opts/CURLOPT_IOCTLFUNCTION.3 index ebfe8df..b20c22c 100644 --- a/docs/libcurl/opts/CURLOPT_IOCTLFUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_IOCTLFUNCTION.3 @@ -57,7 +57,7 @@ The callback MUST return \fICURLIOE_UNKNOWNCMD\fP if the input \fIcmd\fP is not \fICURLIOCMD_RESTARTREAD\fP. The \fIclientp\fP argument to the callback is set with the -\fICURLOPT_IOCTLDATA(3)\fP option. +\fUICURLOPT_IOCTLDATA(3)\fP option. This option is deprecated! Do not use it. Use \fICURLOPT_SEEKFUNCTION(3)\fP instead to provide seeking! If \fICURLOPT_SEEKFUNCTION(3)\fP is set, this diff --git a/docs/libcurl/opts/CURLOPT_MAIL_AUTH.3 b/docs/libcurl/opts/CURLOPT_MAIL_AUTH.3 index 4591a01..dda088a 100644 --- a/docs/libcurl/opts/CURLOPT_MAIL_AUTH.3 +++ b/docs/libcurl/opts/CURLOPT_MAIL_AUTH.3 @@ -22,7 +22,7 @@ .\" .TH CURLOPT_MAIL_AUTH 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" .SH NAME -CURLOPT_MAIL_AUTH \- SMTP authentication address +CURLOPT_MAIL_AUTH \- specify SMTP authentication address .SH SYNOPSIS #include diff --git a/docs/libcurl/opts/CURLOPT_MAIL_FROM.3 b/docs/libcurl/opts/CURLOPT_MAIL_FROM.3 index bf7160e..f935429 100644 --- a/docs/libcurl/opts/CURLOPT_MAIL_FROM.3 +++ b/docs/libcurl/opts/CURLOPT_MAIL_FROM.3 @@ -22,7 +22,7 @@ .\" .TH CURLOPT_MAIL_FROM 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" .SH NAME -CURLOPT_MAIL_FROM \- SMTP sender address +CURLOPT_MAIL_FROM \- smtp mail FROM address .SH SYNOPSIS #include diff --git a/docs/libcurl/opts/CURLOPT_MAIL_RCPT.3 b/docs/libcurl/opts/CURLOPT_MAIL_RCPT.3 index 95665e7..6bda950 100644 --- a/docs/libcurl/opts/CURLOPT_MAIL_RCPT.3 +++ b/docs/libcurl/opts/CURLOPT_MAIL_RCPT.3 @@ -22,7 +22,7 @@ .\" .TH CURLOPT_MAIL_RCPT 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" .SH NAME -CURLOPT_MAIL_RCPT \- list of SMTP mail recipients +CURLOPT_MAIL_RCPT \- provide list of mail recipients .SH SYNOPSIS .nf #include diff --git a/docs/libcurl/opts/CURLOPT_MAXCONNECTS.3 b/docs/libcurl/opts/CURLOPT_MAXCONNECTS.3 index 2a41b37..2a7d18d 100644 --- a/docs/libcurl/opts/CURLOPT_MAXCONNECTS.3 +++ b/docs/libcurl/opts/CURLOPT_MAXCONNECTS.3 @@ -22,18 +22,18 @@ .\" .TH CURLOPT_MAXCONNECTS 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" .SH NAME -CURLOPT_MAXCONNECTS \- maximum connection cache size +CURLOPT_MAXCONNECTS \- set connection cache size .SH SYNOPSIS #include CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAXCONNECTS, long amount); .SH DESCRIPTION -Pass a long. The set \fIamount\fP will be the maximum number of simultaneously -open persistent connections that libcurl may cache in the pool associated with -this handle. The default is 5, and there isn't much point in changing this -value unless you are perfectly aware of how this works and changes libcurl's -behaviour. This concerns connections using any of the protocols that support -persistent connections. +Pass a long. The set number will be the persistent connection cache size. The +set \fIamount\fP will be the maximum amount of simultaneously open connections +that libcurl may cache in cache associated with this handle. Default is 5, and +there isn't much point in changing this value unless you are perfectly aware +of how this works and changes libcurl's behaviour. This concerns connections +using any of the protocols that support persistent connections. When reaching the maximum limit, curl closes the oldest one in the cache to prevent increasing the number of open connections. diff --git a/docs/libcurl/opts/CURLOPT_MAXREDIRS.3 b/docs/libcurl/opts/CURLOPT_MAXREDIRS.3 index 34608c3..52d2567 100644 --- a/docs/libcurl/opts/CURLOPT_MAXREDIRS.3 +++ b/docs/libcurl/opts/CURLOPT_MAXREDIRS.3 @@ -39,23 +39,9 @@ Set it to -1 for an infinite number of redirects. .SH DEFAULT -1, unlimited .SH PROTOCOLS -HTTP(S) +HTTP .SH EXAMPLE -.nf -curl = curl_easy_init(); -if(curl) { - curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/"); - - /* enable redirect following */ - curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); - - /* allow three redirects */ - curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 3L); - - /* Perform the request */ - curl_easy_perform(curl); -} -.fi +TODO .SH AVAILABILITY Along with HTTP .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_NOBODY.3 b/docs/libcurl/opts/CURLOPT_NOBODY.3 index b303b95..9720f45 100644 --- a/docs/libcurl/opts/CURLOPT_NOBODY.3 +++ b/docs/libcurl/opts/CURLOPT_NOBODY.3 @@ -22,35 +22,21 @@ .\" .TH CURLOPT_NOBODY 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" .SH NAME -CURLOPT_NOBODY \- do the download request without getting the body +CURLOPT_NOBODY \- do the request without getting the body .SH SYNOPSIS #include CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NOBODY, long opt); .SH DESCRIPTION A long parameter set to 1 tells libcurl to not include the body-part in the -output when doing what would otherwise be a download. For HTTP(S), this makes -libcurl do a HEAD request. For most other protocols it means just not asking -to transfer the body data. - -Enabling this option means asking for a download but without a body. +output. For HTTP(S), this makes libcurl do a HEAD request. For most other +protocols ie means just not asking for transferring the body data. .SH DEFAULT 0, the body is transferred .SH PROTOCOLS Most .SH EXAMPLE -.nf -curl = curl_easy_init(); -if(curl) { - curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); - - /* get us the resource without a body! */ - curl_easy_setopt(curl, CURLOPT_NOBODY, 1L); - - /* Perform the request */ - curl_easy_perform(curl); -} -.fi +TODO .SH AVAILABILITY Always .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY.3 b/docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY.3 deleted file mode 100644 index 2d86392..0000000 --- a/docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY.3 +++ /dev/null @@ -1,65 +0,0 @@ -.\" ************************************************************************** -.\" * _ _ ____ _ -.\" * 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 http://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_PINNEDPUBLICKEY 3 "27 Aug 2014" "libcurl 7.38.0" "curl_easy_setopt options" -.SH NAME -CURLOPT_PINNEDPUBLICKEY \- set pinned public key -.SH SYNOPSIS -#include - -CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PINNEDPUBLICKEY, char *pinnedpubkey); -.SH DESCRIPTION -Pass a pointer to a zero terminated string as parameter. The string should be -the file name of your pinned public key. The format expected is "PEM" or "DER". - -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. -.SH DEFAULT -NULL -.SH PROTOCOLS -All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc. -.SH EXAMPLE -.nf -CURL *curl = curl_easy_init(); -if(curl) { - curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); - curl_easy_setopt(curl, CURLOPT_PINNEDPUBLICKEY, "/etc/publickey.der"); - - /* Perform the request */ - curl_easy_perform(curl); -} -.fi -.SH AVAILABILITY -If built TLS enabled. This is currently only implemented in the OpenSSL, -GnuTLS and GSKit backends. - -Added in libcurl 7.39.0 -.SH RETURN VALUE -Returns CURLE_OK if TLS enabled, CURLE_UNKNOWN_OPTION if not, or -CURLE_OUT_OF_MEMORY if there was insufficient heap space. -.SH "SEE ALSO" -.BR CURLOPT_SSL_VERIFYPEER "(3), " -.BR CURLOPT_SSL_VERIFYHOST "(3), " -.BR CURLOPT_CAINFO "(3), " -.BR CURLOPT_CAPATH "(3), " diff --git a/docs/libcurl/opts/CURLOPT_POSTFIELDS.3 b/docs/libcurl/opts/CURLOPT_POSTFIELDS.3 index d559143..b410bf6 100644 --- a/docs/libcurl/opts/CURLOPT_POSTFIELDS.3 +++ b/docs/libcurl/opts/CURLOPT_POSTFIELDS.3 @@ -35,8 +35,6 @@ way. For example, the web server may assume that this data is url-encoded. The data pointed to is NOT copied by the library: as a consequence, it must be preserved by the calling application until the associated transfer finishes. -This behaviour can be changed (so libcurl does copy the data) by setting the -\fICURLOPT_COPYPOSTFIELDS(3)\fP option. This POST is a normal application/x-www-form-urlencoded kind (and libcurl will set that Content-Type by default when this option is used), which is commonly @@ -60,22 +58,7 @@ NULL .SH PROTOCOLS HTTP .SH EXAMPLE -.nf -CURL *curl = curl_easy_init(); -if(curl) { - const char *data = "data to send"; - - curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); - - /* size of the POST data */ - curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 12L); - - /* pass in a pointer to the data - libcurl will not copy */ - curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data); - - curl_easy_perform(curl); -} -.fi +TODO .SH AVAILABILITY Always .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE.3 b/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE.3 index 0166805..52be3f6 100644 --- a/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE.3 +++ b/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE.3 @@ -39,21 +39,7 @@ If you post more than 2GB, use \fICURLOPT_POSTFIELDSIZE_LARGE(3)\fP. .SH PROTOCOLS HTTP .SH EXAMPLE -.nf -CURL *curl = curl_easy_init(); -if(curl) { - const char *data = "data to send"; - - curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); - - /* size of the POST data */ - curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long) strlen(data)); - - curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data); - - curl_easy_perform(curl); -} -.fi +TODO .SH AVAILABILITY Along with HTTP .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3 b/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3 index 50fc351..2bcb67e 100644 --- a/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3 +++ b/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3 @@ -37,28 +37,12 @@ set to -1, the library will use strlen() to get the size. .SH DEFAULT -1 .SH PROTOCOLS -HTTP(S) +HTTP .SH EXAMPLE -.nf -CURL *curl = curl_easy_init(); -if(curl) { - const char *data = large_chunk; - curl_off_t length_of_data; /* set somehow */ - - curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); - - /* size of the POST data */ - curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE_LARGE, length_of_data); - - curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data); - - curl_easy_perform(curl); -} -.fi +TODO .SH AVAILABILITY Along with HTTP .SH RETURN VALUE Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not. .SH "SEE ALSO" .BR CURLOPT_POSTFIELDS "(3), " CURLOPT_COPYPOSTFIELDS "(3), " -.BR CURLOPT_POSTFIELDSIZE "(3), " diff --git a/docs/libcurl/opts/CURLOPT_POSTREDIR.3 b/docs/libcurl/opts/CURLOPT_POSTREDIR.3 index aa36bd0..cacb0aa 100644 --- a/docs/libcurl/opts/CURLOPT_POSTREDIR.3 +++ b/docs/libcurl/opts/CURLOPT_POSTREDIR.3 @@ -47,26 +47,12 @@ when setting \fICURLOPT_FOLLOWLOCATION(3)\fP. .SH DEFAULT 0 .SH PROTOCOLS -HTTP(S) +HTTP .SH EXAMPLE -.nf -CURL *curl = curl_easy_init(); -if(curl) { - curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); - - /* a silly POST example */ - curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "data=true"); - - /* example.com is redirected, so we tell libcurl to send POST on 301, 302 and - 303 HTTP response codes */ - curl_easy_setopt(curl, CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL); - - curl_easy_perform(curl); -} -.fi +TODO .SH AVAILABILITY Added in 7.17.1. This option was known as CURLOPT_POST301 up to 7.19.0 as it -only supported the 301 then. CURL_REDIR_POST_303 was added in 7.26.0. +only supported the 301 then. .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_PROTOCOLS.3 b/docs/libcurl/opts/CURLOPT_PROTOCOLS.3 index 958eeeb..fafc462 100644 --- a/docs/libcurl/opts/CURLOPT_PROTOCOLS.3 +++ b/docs/libcurl/opts/CURLOPT_PROTOCOLS.3 @@ -32,61 +32,17 @@ Pass a long that holds a bitmask of CURLPROTO_* defines. If used, this bitmask limits what protocols libcurl may use in the transfer. This allows you to have a libcurl built to support a wide range of protocols but still limit specific transfers to only be allowed to use a subset of them. By default libcurl will -accept all protocols it supports (\fICURLPROTO_ALL\fP). See also +accept all protocols it supports. See also \fICURLOPT_REDIR_PROTOCOLS(3)\fP. - -These are the available protocol defines: -.nf -CURLPROTO_DICT -CURLPROTO_FILE -CURLPROTO_FTP -CURLPROTO_FTPS -CURLPROTO_GOPHER -CURLPROTO_HTTP -CURLPROTO_HTTPS -CURLPROTO_IMAP -CURLPROTO_IMAPS -CURLPROTO_LDAP -CURLPROTO_LDAPS -CURLPROTO_POP3 -CURLPROTO_POP3S -CURLPROTO_RTMP -CURLPROTO_RTMPE -CURLPROTO_RTMPS -CURLPROTO_RTMPT -CURLPROTO_RTMPTE -CURLPROTO_RTMPTS -CURLPROTO_RTSP -CURLPROTO_SCP -CURLPROTO_SFTP -CURLPROTO_SMB -CURLPROTO_SMTP -CURLPROTO_SMTPS -CURLPROTO_TELNET -CURLPROTO_TFTP -.fi .SH DEFAULT All protocols built-in .SH PROTOCOLS All .SH EXAMPLE -.nf -curl = curl_easy_init(); -if(curl) { - /* pass in the URL from an external source */ - curl_easy_setopt(curl, CURLOPT_URL, argv[1]); - - /* only allow HTTP, TFTP and SFTP */ - curl_easy_setopt(curl, CURLOPT_PROTOCOLS, - CURLPROTO_HTTP | CURLPROTO_TFTP | CURLPROTO_SFTP); - - /* Perform the request */ - curl_easy_perform(curl); -} -.fi +TODO .SH AVAILABILITY Added in 7.19.4 .SH RETURN VALUE Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. .SH "SEE ALSO" -.BR CURLOPT_REDIR_PROTOCOLS "(3), " CURLOPT_URL "(3), " +.BR CURLOPT_REDIR_PROTOCOLS "(3), " diff --git a/docs/libcurl/opts/CURLOPT_PROXYPASSWORD.3 b/docs/libcurl/opts/CURLOPT_PROXYPASSWORD.3 index 43536ca..6fc0af8 100644 --- a/docs/libcurl/opts/CURLOPT_PROXYPASSWORD.3 +++ b/docs/libcurl/opts/CURLOPT_PROXYPASSWORD.3 @@ -22,7 +22,7 @@ .\" .TH CURLOPT_PROXYPASSWORD 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" .SH NAME -CURLOPT_PROXYPASSWORD \- password to use with proxy authentication +CURLOPT_PROXYPASSWORD \- password to use in authentication with proxy .SH SYNOPSIS #include diff --git a/docs/libcurl/opts/CURLOPT_PROXYUSERNAME.3 b/docs/libcurl/opts/CURLOPT_PROXYUSERNAME.3 index c342ec4..08ca2e0 100644 --- a/docs/libcurl/opts/CURLOPT_PROXYUSERNAME.3 +++ b/docs/libcurl/opts/CURLOPT_PROXYUSERNAME.3 @@ -22,7 +22,7 @@ .\" .TH CURLOPT_PROXYUSERNAME 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" .SH NAME -CURLOPT_PROXYUSERNAME \- user name to use for proxy authentication +CURLOPT_PROXYUSERNAME \- username to authenticate with a proxy .SH SYNOPSIS .nf #include diff --git a/docs/libcurl/opts/CURLOPT_PROXYUSERPWD.3 b/docs/libcurl/opts/CURLOPT_PROXYUSERPWD.3 index bbf0da5..1632f0a 100644 --- a/docs/libcurl/opts/CURLOPT_PROXYUSERPWD.3 +++ b/docs/libcurl/opts/CURLOPT_PROXYUSERPWD.3 @@ -22,7 +22,7 @@ .\" .TH CURLOPT_PROXYUSERPWD 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" .SH NAME -CURLOPT_PROXYUSERPWD \- user name and password to use for proxy authentication +CURLOPT_PROXYUSERPWD \- set user and password to use for the proxy .SH SYNOPSIS #include diff --git a/docs/libcurl/opts/CURLOPT_PUT.3 b/docs/libcurl/opts/CURLOPT_PUT.3 index bd40b7f..134abe9 100644 --- a/docs/libcurl/opts/CURLOPT_PUT.3 +++ b/docs/libcurl/opts/CURLOPT_PUT.3 @@ -32,7 +32,7 @@ A parameter set to 1 tells the library to use HTTP PUT to transfer data. The data should be set with \fICURLOPT_READDATA(3)\fP and \fICURLOPT_INFILESIZE(3)\fP. -This option is \fBdeprecated\fP since version 7.12.1. Use +This option is \dBdeprecated\fP since version 7.12.1. Use \fICURLOPT_UPLOAD(3)\fP! .SH DEFAULT 0, disabled diff --git a/docs/libcurl/opts/CURLOPT_RANGE.3 b/docs/libcurl/opts/CURLOPT_RANGE.3 index f5dd555..48c3ed9 100644 --- a/docs/libcurl/opts/CURLOPT_RANGE.3 +++ b/docs/libcurl/opts/CURLOPT_RANGE.3 @@ -43,24 +43,13 @@ Pass a NULL to this option to disable the use of ranges. .SH DEFAULT NULL .SH PROTOCOLS -HTTP, FTP, FILE, RTSP and SFTP. +HTTP, FTP, FILE and RTSP .SH EXAMPLE -.nf -CURL *curl = curl_easy_init(); -if(curl) { - curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); - - /* get the first 200 bytes */ - curl_easy_setopt(curl, CURLOPT_RANGE, "0-199"); - - /* Perform the request */ - curl_easy_perform(curl); -} -.fi +TODO .SH AVAILABILITY FILE since 7.18.0, RTSP since 7.20.0 .SH RETURN VALUE Returns CURLE_OK on success or CURLE_OUT_OF_MEMORY if there was insufficient heap space. .SH "SEE ALSO" -.BR CURLOPT_RESUME_FROM "(3), " +.BR CURLOPT_RESUME_FROM "(3), " diff --git a/docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS.3 b/docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS.3 index fbec9f5..018b689 100644 --- a/docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS.3 +++ b/docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS.3 @@ -34,58 +34,14 @@ redirect when \fICURLOPT_FOLLOWLOCATION(3)\fP is enabled. This allows you to limit specific transfers to only be allowed to use a subset of protocols in redirections. By default libcurl will allow all protocols except for FILE and SCP. - -These are the available protocol defines: -.nf -CURLPROTO_DICT -CURLPROTO_FILE -CURLPROTO_FTP -CURLPROTO_FTPS -CURLPROTO_GOPHER -CURLPROTO_HTTP -CURLPROTO_HTTPS -CURLPROTO_IMAP -CURLPROTO_IMAPS -CURLPROTO_LDAP -CURLPROTO_LDAPS -CURLPROTO_POP3 -CURLPROTO_POP3S -CURLPROTO_RTMP -CURLPROTO_RTMPE -CURLPROTO_RTMPS -CURLPROTO_RTMPT -CURLPROTO_RTMPTE -CURLPROTO_RTMPTS -CURLPROTO_RTSP -CURLPROTO_SCP -CURLPROTO_SFTP -CURLPROTO_SMB -CURLPROTO_SMTP -CURLPROTO_SMTPS -CURLPROTO_TELNET -CURLPROTO_TFTP -.fi .SH DEFAULT -All protocols except for FILE, SCP and SMB. +All protocols except for FILE and SCP .SH PROTOCOLS All .SH EXAMPLE -.nf -curl = curl_easy_init(); -if(curl) { - /* pass in the URL from an external source */ - curl_easy_setopt(curl, CURLOPT_URL, argv[1]); - - /* only allow redirects to HTTP and HTTPS URLs */ - curl_easy_setopt(curl, CURLOPT_REDIR_PROTOCOLS, - CURLPROTO_HTTP | CURLPROTO_HTTPS); - - /* Perform the request */ - curl_easy_perform(curl); -} -.fi +TODO .SH AVAILABILITY -Added in 7.19.4, before then it would follow all protocols. +Added in 7.19.4, before then it would follow all protcols. .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_RESOLVE.3 b/docs/libcurl/opts/CURLOPT_RESOLVE.3 index 06a393a..a1e82bc 100644 --- a/docs/libcurl/opts/CURLOPT_RESOLVE.3 +++ b/docs/libcurl/opts/CURLOPT_RESOLVE.3 @@ -57,23 +57,7 @@ NULL .SH PROTOCOLS All .SH EXAMPLE -.nf -CURL *curl; -struct curl_slist *host = NULL; -host = curl_slist_append(NULL, "example.com:80:127.0.0.1"); - -curl = curl_easy_init(); -if(curl) { - curl_easy_setopt(curl, CURLOPT_RESOLVE, host); - curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); - res = curl_easy_perform(curl); - - /* always cleanup */ - curl_easy_cleanup(curl); -} - -curl_slist_free_all(host); -.fi +TODO .SH AVAILABILITY Added in 7.21.3 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_RESUME_FROM.3 b/docs/libcurl/opts/CURLOPT_RESUME_FROM.3 index c25c646..c61fd3b 100644 --- a/docs/libcurl/opts/CURLOPT_RESUME_FROM.3 +++ b/docs/libcurl/opts/CURLOPT_RESUME_FROM.3 @@ -45,28 +45,10 @@ If you need to resume a transfer beyond the 2GB limit, use .SH PROTOCOLS HTTP, FTP, SFTP, FILE .SH EXAMPLE -.nf -CURL *curl = curl_easy_init(); -if(curl) { - curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com"); - - /* resume upload at byte index 200 */ - curl_easy_setopt(curl, CURLOPT_RESUME_FROM, 200L); - - /* ask for upload */ - curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L); - - /* set total data amount to expect */ - curl_easy_setopt(curl, CURLOPT_INFILESIZE, size_of_file); - - /* Perform the request */ - curl_easy_perform(curl); -} -.fi +TODO .SH AVAILABILITY Always .SH RETURN VALUE Returns CURLE_OK .SH "SEE ALSO" .BR CURLOPT_RESUME_FROM_LARGE "(3), " CURLOPT_RANGE "(3), " -.BR CURLOPT_INFILESIZE "(3), " diff --git a/docs/libcurl/opts/CURLOPT_RESUME_FROM_LARGE.3 b/docs/libcurl/opts/CURLOPT_RESUME_FROM_LARGE.3 index bcb30af..59c8310 100644 --- a/docs/libcurl/opts/CURLOPT_RESUME_FROM_LARGE.3 +++ b/docs/libcurl/opts/CURLOPT_RESUME_FROM_LARGE.3 @@ -44,31 +44,10 @@ source file to the remote target file. .SH PROTOCOLS HTTP, FTP, SFTP, FILE .SH EXAMPLE -.nf -CURL *curl = curl_easy_init(); -if(curl) { - curl_off_t resume_position = GET_IT_SOMEHOW; - curl_off_t file_size = GET_IT_SOMEHOW_AS_WELL; - - curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com"); - - /* resuming upload at this position, possibly beyond 2GB */ - curl_easy_setopt(curl, CURLOPT_RESUME_FROM_LARGE, resume_position); - - /* ask for upload */ - curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L); - - /* set total data amount to expect */ - curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, file_size); - - /* Perform the request */ - curl_easy_perform(curl); -} -.fi +TODO .SH AVAILABILITY Added in 7.11.0 .SH RETURN VALUE Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. .SH "SEE ALSO" .BR CURLOPT_RESUME_FROM "(3), " CURLOPT_RANGE "(3), " -.BR CURLOPT_INFILESIZE_LARGE "(3), " diff --git a/docs/libcurl/opts/CURLOPT_SASL_IR.3 b/docs/libcurl/opts/CURLOPT_SASL_IR.3 index 7714217..dbf6b17 100644 --- a/docs/libcurl/opts/CURLOPT_SASL_IR.3 +++ b/docs/libcurl/opts/CURLOPT_SASL_IR.3 @@ -30,14 +30,8 @@ CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SASL_IR, long enable); .SH DESCRIPTION Pass a long. If the value is 1, curl will send the initial response to the server in the first authentication packet in order to reduce the number of -ping pong requests. Only applicable to the following supporting SASL -authentication mechanisms: - -* Login -* Plain -* GSSAPI -* NTLM -* OAuth 2.0 +ping pong requests. Only applicable to supporting SASL authentication +mechanisms and to the IMAP, POP3 and SMTP protocols. Note: Whilst IMAP supports this option there is no need to explicitly set it, as libcurl can determine the feature itself when the server supports the diff --git a/docs/libcurl/opts/CURLOPT_SSH_KEYDATA.3 b/docs/libcurl/opts/CURLOPT_SSH_KEYDATA.3 index 45e7d7a..df270a4 100644 --- a/docs/libcurl/opts/CURLOPT_SSH_KEYDATA.3 +++ b/docs/libcurl/opts/CURLOPT_SSH_KEYDATA.3 @@ -22,7 +22,7 @@ .\" .TH CURLOPT_SSH_KEYDATA 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" .SH NAME -CURLOPT_SSH_KEYDATA \- pointer to pass to the SSH key callback +CURLOPT_SSH_KEYDATA \- pointer to apss to the SSH key callback .SH SYNOPSIS #include diff --git a/docs/libcurl/opts/CURLOPT_SSLVERSION.3 b/docs/libcurl/opts/CURLOPT_SSLVERSION.3 index a10dabd..f1212a0 100644 --- a/docs/libcurl/opts/CURLOPT_SSLVERSION.3 +++ b/docs/libcurl/opts/CURLOPT_SSLVERSION.3 @@ -35,7 +35,7 @@ Use one of the available defines for this purpose. The available options are: .RS .IP CURL_SSLVERSION_DEFAULT The default action. This will attempt to figure out the remote SSL protocol -version. +version, i.e. either SSLv3 or TLSv1 .IP CURL_SSLVERSION_TLSv1 TLSv1.x .IP CURL_SSLVERSION_SSLv2 @@ -54,25 +54,10 @@ CURL_SSLVERSION_DEFAULT .SH PROTOCOLS All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc. .SH EXAMPLE -.nf -CURL *curl = curl_easy_init(); -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_SSLVERSION, CURL_SSLVERSION_TLSv1); - - /* Perform the request */ - curl_easy_perform(curl); -} -.fi +TODO .SH AVAILABILITY -SSLv2 is disabled by default since 7.18.1. Other SSL versions availability may -vary depending on which backend libcurl has been built to use. - -SSLv3 is disabled by default since 7.39.0. +SSLv2 is disabled by default since 7.18.1 .SH RETURN VALUE Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. .SH "SEE ALSO" .BR CURLOPT_USE_SSL "(3), " CURLOPT_HTTP_VERSION "(3), " -.BR CURLOPT_IPRESOLVE "(3) " diff --git a/docs/libcurl/opts/CURLOPT_SSL_VERIFYPEER.3 b/docs/libcurl/opts/CURLOPT_SSL_VERIFYPEER.3 index f2bad74..ec158cc 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_VERIFYPEER.3 +++ b/docs/libcurl/opts/CURLOPT_SSL_VERIFYPEER.3 @@ -51,12 +51,6 @@ typically also want to ensure that the server is the server you mean to be talking to. Use \fICURLOPT_SSL_VERIFYHOST(3)\fP for that. The check that the host name in the certificate is valid for the host name you're connecting to is done independently of the \fICURLOPT_SSL_VERIFYPEER(3)\fP option. - -WARNING: disabling verification of the certificate allows bad guys to -man-in-the-middle the communication without you knowing it. Disabling -verification makes the communication insecure. Just having encryption on a -transfer is not enough as you cannot be sure that you are communicating with -the correct end-point. .SH DEFAULT By default, curl assumes a value of 1. .SH PROTOCOLS diff --git a/docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.3 b/docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.3 deleted file mode 100644 index d5217cb..0000000 --- a/docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.3 +++ /dev/null @@ -1,53 +0,0 @@ -.\" ************************************************************************** -.\" * _ _ ____ _ -.\" * 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 http://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_SSL_VERIFYSTATUS 3 "04 Dec 2014" "libcurl 7.40.0" "curl_easy_setopt options" -.SH NAME -CURLOPT_SSL_VERIFYSTATUS \- verify the certificate's status -.SH SYNOPSIS -#include - -CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_VERIFYSTATUS, long verify); -.SH DESCRIPTION -Pass a long as parameter to enable or disable. - -This option determines whether libcurl verifies the status of the server cert -using the "Certificate Status Request" TLS extension (aka. OCSP stapling). - -Note that if this option is enabled but the server does not support the TLS -extension, the verification will fail. - -.SH DEFAULT -0 -.SH PROTOCOLS -All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc. -.SH EXAMPLE -TODO -.SH AVAILABILITY -This is currently only supported by the GnuTLS and NSS TLS backends. -.SH RETURN VALUE -Returns CURLE_OK if OCSP stapling is supported by the SSL backend, otherwise -returns CURLE_NOT_BUILT_IN. -.SH "SEE ALSO" -.BR CURLOPT_SSL_VERIFYHOST "(3), " -.BR CURLOPT_SSL_VERIFYPEER "(3), " -.BR CURLOPT_CAINFO "(3), " diff --git a/docs/libcurl/opts/CURLOPT_TIMEOUT.3 b/docs/libcurl/opts/CURLOPT_TIMEOUT.3 index 41e0569..66ab8b9 100644 --- a/docs/libcurl/opts/CURLOPT_TIMEOUT.3 +++ b/docs/libcurl/opts/CURLOPT_TIMEOUT.3 @@ -37,9 +37,6 @@ libcurl to use the SIGALRM signal to timeout system calls. In unix-like systems, this might cause signals to be used unless \fICURLOPT_NOSIGNAL(3)\fP is set. -If both \fICURLOPT_TIMEOUT(3)\fP and \fICURLOPT_TIMEOUT_MS(3)\fP are set, the -value set last will be used. - Since this puts a hard limit for how long time a request is allowed to take, it has limited use in dynamic use cases with varying transfer times. You are then advised to explore \fICURLOPT_LOW_SPEED_LIMIT(3)\fP, diff --git a/docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.3 b/docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.3 index 1c8697f..39f8cbf 100644 --- a/docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.3 +++ b/docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.3 @@ -22,7 +22,7 @@ .\" .TH CURLOPT_TLSAUTH_PASSWORD 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" .SH NAME -CURLOPT_TLSAUTH_PASSWORD \- password to use for TLS authentication +CURLOPT_TLSAUTH_PASSWORD \- TLS authentication password .SH SYNOPSIS #include @@ -31,7 +31,7 @@ CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TLSAUTH_PASSWORD, char *pwd); Pass a char * as parameter, which should point to the zero terminated password to use for the TLS authentication method specified with the \fICURLOPT_TLSAUTH_TYPE(3)\fP option. Requires that the -\fICURLOPT_TLSAUTH_USERNAME(3)\fP option also be set. +\fICURLOPT_TLS_USERNAME(3)\fP option also be set. .SH DEFAULT NULL .SH PROTOCOLS diff --git a/docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.3 b/docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.3 index c5bb2df..bacf9cc 100644 --- a/docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.3 +++ b/docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.3 @@ -22,7 +22,7 @@ .\" .TH CURLOPT_TLSAUTH_USERNAME 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" .SH NAME -CURLOPT_TLSAUTH_USERNAME \- user name to use for TLS authentication +CURLOPT_TLSAUTH_USERNAME \- user name for TLS authentication .SH SYNOPSIS #include @@ -31,7 +31,7 @@ CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TLSAUTH_USERNAME, char *user); Pass a char * as parameter, which should point to the zero terminated username to use for the TLS authentication method specified with the \fICURLOPT_TLSAUTH_TYPE(3)\fP option. Requires that the -\fICURLOPT_TLSAUTH_PASSWORD(3)\fP option also be set. +\fICURLOPT_TLS_PASSWORD(3)\fP option also be set. .SH DEFAULT NULL .SH PROTOCOLS diff --git a/docs/libcurl/opts/CURLOPT_UNIX_SOCKET_PATH.3 b/docs/libcurl/opts/CURLOPT_UNIX_SOCKET_PATH.3 deleted file mode 100644 index a659cd2..0000000 --- a/docs/libcurl/opts/CURLOPT_UNIX_SOCKET_PATH.3 +++ /dev/null @@ -1,78 +0,0 @@ -.\" ************************************************************************** -.\" * _ _ ____ _ -.\" * 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 http://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_UNIX_SOCKET_PATH 3 "09 Oct 2014" "libcurl 7.40.0" "curl_easy_setopt options" -.SH NAME -CURLOPT_UNIX_SOCKET_PATH \- set Unix domain socket -.SH SYNOPSIS -#include - -CURLcode curl_easy_setopt(CURL *handle, CURLOPT_UNIX_SOCKET_PATH, char *path); -.SH DESCRIPTION -Enables the use of Unix domain sockets as connection endpoint and sets the path -to \fIpath\fP. If \fIpath\fP is NULL, then Unix domain sockets are disabled. An -empty string will result in an error at some point, it will not disable use of -Unix domain sockets. - -When enabled, cURL will connect to the Unix domain socket instead of -establishing a TCP connection to a host. Since no TCP connection is created, -cURL does not need to resolve the DNS hostname in the URL. - -The maximum path length on Cygwin, Linux and Solaris is 107. On other platforms -it might be even less. - -Proxy and TCP options such as -.BR CURLOPT_TCP_NODELAY "(3) -are not supported. Proxy options such as -.BR CURLOPT_PROXY "(3) -have no effect either as these are TCP-oriented, and asking a proxy server to -connect to a certain Unix domain socket is not possible. -.SH DEFAULT -Default is NULL, meaning that no Unix domain sockets are used. -.SH PROTOCOLS -All protocols except for file:// and FTP are supported in theory. HTTP, IMAP, -POP3 and SMTP should in particular work (including their SSL/TLS variants). -.SH EXAMPLE -Given that you have an nginx server running, listening on /tmp/nginx.sock, you -can request a HTTP resource with: - -.nf - curl_easy_setopt(curl_handle, CURLOPT_UNIX_SOCKET_PATH, "/tmp/nginx.sock"); - curl_easy_setopt(curl_handle, CURLOPT_URL, "http://localhost/"); -.fi - -If you are on Linux and somehow have a need for paths larger than 107 bytes, you -could use the proc filesystem to bypass the limitation: - -.nf - int dirfd = open(long_directory_path_to_socket, O_DIRECTORY | O_RDONLY); - char path[108]; - snprintf(path, sizeof(path), "/proc/self/fd/%d/nginx.sock", dirfd); - curl_easy_setopt(curl_handle, CURLOPT_UNIX_SOCKET_PATH, path); - /* Be sure to keep dirfd valid until you discard the handle */ -.fi -.SH AVAILABILITY -Since 7.40.0. -.SH RETURN VALUE -Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. -.SH "SEE ALSO" -.BR CURLOPT_OPENSOCKETFUNCTION "(3), " unix "(7), " diff --git a/docs/libcurl/opts/CURLOPT_UPLOAD.3 b/docs/libcurl/opts/CURLOPT_UPLOAD.3 index d24bd28..8d81590 100644 --- a/docs/libcurl/opts/CURLOPT_UPLOAD.3 +++ b/docs/libcurl/opts/CURLOPT_UPLOAD.3 @@ -47,28 +47,7 @@ must specify the size. .SH PROTOCOLS Most .SH EXAMPLE -.nf -CURL *curl = curl_easy_init(); -if(curl) { - /* we want to use our own read function */ - curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback); - - /* enable uploading */ - curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L); - - /* specify target */ - curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/dir/to/newfile"); - - /* now specify which pointer to pass to our callback */ - curl_easy_setopt(curl, CURLOPT_READDATA, hd_src); - - /* Set the size of the file to upload */ - curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, (curl_off_t)fsize); - - /* Now run off and do what you've been told! */ - curl_easy_perform(curl); -} -.fi +TODO .SH AVAILABILITY Always .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_URL.3 b/docs/libcurl/opts/CURLOPT_URL.3 index bf19228..dd508df 100644 --- a/docs/libcurl/opts/CURLOPT_URL.3 +++ b/docs/libcurl/opts/CURLOPT_URL.3 @@ -22,7 +22,7 @@ .\" .TH CURLOPT_URL 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" .SH NAME -CURLOPT_URL \- provide the URL to use in the request +CURLOPT_URL \- provide the URL to use in the reqest .SH SYNOPSIS #include @@ -80,8 +80,6 @@ http://user:password@www.example.com ftp://user:password@ftp.example.com -smb://domain%2fuser:password@server.example.com - imap://user:password;options@mail.example.com pop3://user:password;options@mail.example.com @@ -238,20 +236,6 @@ user's home directory sftp://ssh.example.com/~/Documents/ - This requests a directory listing of the Documents directory under the user's home directory -.IP SMB -The path part of a SMB request specifies the file to retrieve and from what -share and directory or the share to upload to and as such, may not be omitted. -If the user name is not embedded in the URL, it can be set with the -\fICURLOPT_USERPWD(3)\fP or \fICURLOPT_USERNAME(3)\fP option. If the user name -is embedded in the URL then it must contain the domain name and as such, the -backslash must be URL encoded as %2f. - -smb://server.example.com/files/issue - This specifies the file "issue" located -in the root of the "files" share - -smb://server.example.com/files/ -T issue - This specifies the file "issue" will -be uploaded to the root of the "files" share. - .IP LDAP The path part of a LDAP request can be used to specify the: Distinguished Name, Attributes, Scope, Filter and Extension for a LDAP search. Each field @@ -288,23 +272,12 @@ performed. All .SH EXAMPLE .nf -CURL *curl = curl_easy_init(); -if(curl) { - curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); - - curl_easy_perform(curl); -} -.fi + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); .SH AVAILABILITY -POP3 and SMTP were added in 7.31.0 +POP3 and SMTP added in 7.31.0 .SH RETURN VALUE -Returns CURLE_OK on success or CURLE_OUT_OF_MEMORY if there was insufficient -heap space. - -Note that \fIcurl_easy_setopt(3)\fP won't actually parse the given string so -given a bad URL, it will not be detected until \fIcurl_easy_perform(3)\fP or -similar is called. +Returns CURLE_OK on success or +CURLE_OUT_OF_MEMORY if there was insufficient heap space. .SH "SEE ALSO" .BR CURLOPT_VERBOSE "(3), " CURLOPT_PROTOCOLS "(3), " -.BR CURLOPT_FORBID_REUSE "(3), " CURLOPT_FRESH_CONNECT "(3), " .BR curl_easy_perform "(3)" diff --git a/docs/libcurl/opts/CURLOPT_USERNAME.3 b/docs/libcurl/opts/CURLOPT_USERNAME.3 index 7546f74..0789211 100644 --- a/docs/libcurl/opts/CURLOPT_USERNAME.3 +++ b/docs/libcurl/opts/CURLOPT_USERNAME.3 @@ -22,7 +22,7 @@ .\" .TH CURLOPT_USERNAME 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" .SH NAME -CURLOPT_USERNAME \- user name to use in authentication +CURLOPT_USERNAME \- username to authenticate with .SH SYNOPSIS .nf #include @@ -37,22 +37,6 @@ user name to use for the transfer. authentication. You should not use this option together with the (older) \fICURLOPT_USERPWD(3)\fP option. -When using Kerberos V5 authentication with a Windows based server, you should -include the domain name in order for the server to successfully obtain a -Kerberos Ticket. If you don't then the initial part of the authentication -handshake may fail. - -When using NTLM, the user name can be specified simply as the user name -without the domain name should the server be part of a single domain and -forest. - -To include the domain name use either Down-Level Logon Name or UPN (User -Principal Name) formats. For example, EXAMPLE\\user and user@example.com -respectively. - -Some HTTP servers (on Windows) support inclusion of the domain for Basic -authentication as well. - To specify the password and login options, along with the user name, use the \fICURLOPT_PASSWORD(3)\fP and \fICURLOPT_LOGIN_OPTIONS(3)\fP options. .SH DEFAULT diff --git a/docs/libcurl/opts/CURLOPT_USERPWD.3 b/docs/libcurl/opts/CURLOPT_USERPWD.3 index 22e920f..03d8076 100644 --- a/docs/libcurl/opts/CURLOPT_USERPWD.3 +++ b/docs/libcurl/opts/CURLOPT_USERPWD.3 @@ -22,7 +22,7 @@ .\" .TH CURLOPT_USERPWD 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" .SH NAME -CURLOPT_USERPWD \- user name and password to use in authentication +CURLOPT_USERPWD \- set user + password to work with .SH SYNOPSIS #include @@ -31,21 +31,10 @@ CURLcode curl_easy_setopt(CURL *handle, CURLOPT_USERPWD, char *userpwd); Pass a char * as parameter, pointing to a zero terminated login details string for the connection. The format of which is: [user name]:[password]. -When using Kerberos V5 authentication with a Windows based server, you should -specify the user name part with the domain name in order for the server to -successfully obtain a Kerberos Ticket. If you don't then the initial part of -the authentication handshake may fail. - -When using NTLM, the user name can be specified simply as the user name -without the domain name should the server be part of a single domain and -forest. - -To specify the domain name use either Down-Level Logon Name or UPN (User -Principal Name) formats. For example, EXAMPLE\\user and user@example.com -respectively. - -Some HTTP servers (on Windows) support inclusion of the domain for Basic -authentication as well. +When using NTLM, you can set the domain by prepending it to the user name and +separating the domain and name with a forward (/) or backward slash (\\). Like +this: "domain/user:password" or "domain\\user:password". Some HTTP servers (on +Windows) support this style even for Basic authentication. When using HTTP and \fICURLOPT_FOLLOWLOCATION(3)\fP, libcurl might perform several requests to possibly different hosts. libcurl will only send this user diff --git a/docs/libcurl/opts/CURLOPT_USE_SSL.3 b/docs/libcurl/opts/CURLOPT_USE_SSL.3 index 348f1b0..81e6752 100644 --- a/docs/libcurl/opts/CURLOPT_USE_SSL.3 +++ b/docs/libcurl/opts/CURLOPT_USE_SSL.3 @@ -48,18 +48,6 @@ CURLUSESSL_NONE .SH PROTOCOLS FTP, SMTP, POP3, IMAP .SH EXAMPLE -.nf -CURL *curl = curl_easy_init(); -if(curl) { - curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/dir/file.ext"); - - /* require use of SSL for this, or fail */ - curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_ALL); - - /* Perform the request */ - curl_easy_perform(curl); -} -.fi .SH AVAILABILITY Added in 7.11.0. This option was known as CURLOPT_FTP_SSL up to 7.16.4, and the constants were known as CURLFTPSSL_* diff --git a/docs/libcurl/opts/CURLOPT_VERBOSE.3 b/docs/libcurl/opts/CURLOPT_VERBOSE.3 index 732b8c4..53e29f9 100644 --- a/docs/libcurl/opts/CURLOPT_VERBOSE.3 +++ b/docs/libcurl/opts/CURLOPT_VERBOSE.3 @@ -40,24 +40,7 @@ To also get all the protocol data sent and received, consider using the \fICURLOPT_DEBUGFUNCTION(3)\fP. .SH DEFAULT 0, meaning disabled. -.SH PROTOCOLS -All -.SH EXAMPLE -.nf -CURL *curl = curl_easy_init(); -if(curl) { - curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); - - /* ask libcurl to show us the verbose output */ - curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); - - /* Perform the request */ - curl_easy_perform(curl); -} -.fi -.SH AVAILABILITY -Always .SH RETURN VALUE -Returns CURLE_OK +Returns CURLE_OK. .SH "SEE ALSO" .BR CURLOPT_STDERR "(3), " CURLOPT_DEBUGFUNCTION "(3), " diff --git a/docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.3 b/docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.3 index 2644c88..f975f48 100644 --- a/docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.3 +++ b/docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.3 @@ -22,7 +22,7 @@ .\" .TH CURLOPT_XOAUTH2_BEARER 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" .SH NAME -CURLOPT_XOAUTH2_BEARER \- specify OAuth 2.0 access token +CURLOPT_XOAUTH2_BEARER \- specify OAuth 2 access token .SH SYNOPSIS #include diff --git a/docs/libcurl/opts/Makefile.am b/docs/libcurl/opts/Makefile.am index 5a94f11..30851d3 100644 --- a/docs/libcurl/opts/Makefile.am +++ b/docs/libcurl/opts/Makefile.am @@ -5,7 +5,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +# 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 @@ -92,26 +92,18 @@ man_MANS = CURLOPT_ACCEPT_ENCODING.3 CURLOPT_ACCEPTTIMEOUT_MS.3 \ CURLOPT_SSL_ENABLE_ALPN.3 CURLOPT_SSL_ENABLE_NPN.3 CURLOPT_SSLENGINE.3 \ CURLOPT_SSLENGINE_DEFAULT.3 CURLOPT_SSLKEY.3 CURLOPT_SSLKEYTYPE.3 \ CURLOPT_SSL_OPTIONS.3 CURLOPT_SSL_SESSIONID_CACHE.3 \ - CURLOPT_SSL_VERIFYHOST.3 CURLOPT_SSL_VERIFYPEER.3 \ - CURLOPT_SSL_VERIFYSTATUS.3 CURLOPT_SSLVERSION.3 CURLOPT_STDERR.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_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_TRANSFER_ENCODING.3 \ - CURLOPT_TRANSFERTEXT.3 CURLOPT_UNRESTRICTED_AUTH.3 CURLOPT_UPLOAD.3 \ - CURLOPT_URL.3 CURLOPT_USERAGENT.3 CURLOPT_USERNAME.3 CURLOPT_USERPWD.3 \ + CURLOPT_SSL_VERIFYHOST.3 CURLOPT_SSL_VERIFYPEER.3 CURLOPT_SSLVERSION.3 \ + CURLOPT_STDERR.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_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_TRANSFER_ENCODING.3 CURLOPT_TRANSFERTEXT.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 \ - 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_SOCKETDATA.3 CURLMOPT_SOCKETFUNCTION.3 CURLMOPT_TIMERDATA.3 \ - CURLMOPT_TIMERFUNCTION.3 CURLOPT_UNIX_SOCKET_PATH.3 - + CURLOPT_XFERINFOFUNCTION.3 CURLOPT_XOAUTH2_BEARER.3 HTMLPAGES = CURLOPT_ACCEPT_ENCODING.html CURLOPT_ACCEPTTIMEOUT_MS.html \ CURLOPT_ADDRESS_SCOPE.html CURLOPT_APPEND.html \ @@ -196,8 +188,8 @@ HTMLPAGES = CURLOPT_ACCEPT_ENCODING.html CURLOPT_ACCEPTTIMEOUT_MS.html \ CURLOPT_SSLENGINE_DEFAULT.html CURLOPT_SSLKEY.html \ CURLOPT_SSLKEYTYPE.html CURLOPT_SSL_OPTIONS.html \ CURLOPT_SSL_SESSIONID_CACHE.html CURLOPT_SSL_VERIFYHOST.html \ - CURLOPT_SSL_VERIFYPEER.html CURLOPT_SSL_VERIFYSTATUS.html \ - CURLOPT_SSLVERSION.html CURLOPT_STDERR.html CURLOPT_TCP_KEEPALIVE.html \ + CURLOPT_SSL_VERIFYPEER.html CURLOPT_SSLVERSION.html \ + CURLOPT_STDERR.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_TIMECONDITION.html \ @@ -209,15 +201,7 @@ HTMLPAGES = CURLOPT_ACCEPT_ENCODING.html CURLOPT_ACCEPTTIMEOUT_MS.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 \ - 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_SOCKETDATA.html CURLMOPT_SOCKETFUNCTION.html \ - CURLMOPT_TIMERDATA.html CURLMOPT_TIMERFUNCTION.html \ - CURLOPT_UNIX_SOCKET_PATH.html + CURLOPT_XFERINFOFUNCTION.html CURLOPT_XOAUTH2_BEARER.html PDFPAGES = CURLOPT_ACCEPT_ENCODING.pdf CURLOPT_ACCEPTTIMEOUT_MS.pdf \ CURLOPT_ADDRESS_SCOPE.pdf CURLOPT_APPEND.pdf CURLOPT_AUTOREFERER.pdf \ @@ -299,28 +283,20 @@ PDFPAGES = CURLOPT_ACCEPT_ENCODING.pdf CURLOPT_ACCEPTTIMEOUT_MS.pdf \ CURLOPT_SSLENGINE_DEFAULT.pdf CURLOPT_SSLKEY.pdf \ CURLOPT_SSLKEYTYPE.pdf CURLOPT_SSL_OPTIONS.pdf \ CURLOPT_SSL_SESSIONID_CACHE.pdf CURLOPT_SSL_VERIFYHOST.pdf \ - CURLOPT_SSL_VERIFYPEER.pdf CURLOPT_SSL_VERIFYSTATUS.pdf \ - CURLOPT_SSLVERSION.pdf CURLOPT_STDERR.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_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_TRANSFER_ENCODING.pdf \ - CURLOPT_TRANSFERTEXT.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 \ - 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_SOCKETDATA.pdf CURLMOPT_SOCKETFUNCTION.pdf \ - CURLMOPT_TIMERDATA.pdf CURLMOPT_TIMERFUNCTION.pdf \ - CURLOPT_UNIX_SOCKET_PATH.pdf + CURLOPT_SSL_VERIFYPEER.pdf CURLOPT_SSLVERSION.pdf CURLOPT_STDERR.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_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_TRANSFER_ENCODING.pdf CURLOPT_TRANSFERTEXT.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) diff --git a/docs/libcurl/symbols-in-versions b/docs/libcurl/symbols-in-versions index e9ef3f6..26d53fe 100644 --- a/docs/libcurl/symbols-in-versions +++ b/docs/libcurl/symbols-in-versions @@ -17,8 +17,7 @@ CURLAUTH_ANYSAFE 7.10.6 CURLAUTH_BASIC 7.10.6 CURLAUTH_DIGEST 7.10.6 CURLAUTH_DIGEST_IE 7.19.3 -CURLAUTH_GSSNEGOTIATE 7.10.6 7.38.0 -CURLAUTH_NEGOTIATE 7.38.0 +CURLAUTH_GSSNEGOTIATE 7.10.6 CURLAUTH_NONE 7.10.6 CURLAUTH_NTLM 7.10.6 CURLAUTH_NTLM_WB 7.22.0 @@ -74,7 +73,6 @@ CURLE_FTP_WEIRD_USER_REPLY 7.1 7.17.0 CURLE_FTP_WRITE_ERROR 7.1 7.17.0 CURLE_FUNCTION_NOT_FOUND 7.1 CURLE_GOT_NOTHING 7.9.1 -CURLE_HTTP2 7.38.0 CURLE_HTTP_NOT_FOUND 7.1 CURLE_HTTP_PORT_FAILED 7.3 7.12.0 CURLE_HTTP_POST_ERROR 7.1 @@ -118,10 +116,8 @@ CURLE_SSL_CRL_BADFILE 7.19.0 CURLE_SSL_ENGINE_INITFAILED 7.12.3 CURLE_SSL_ENGINE_NOTFOUND 7.9.3 CURLE_SSL_ENGINE_SETFAILED 7.9.3 -CURLE_SSL_INVALIDCERTSTATUS 7.41.0 CURLE_SSL_ISSUER_ERROR 7.19.0 CURLE_SSL_PEER_CERTIFICATE 7.8 7.17.1 -CURLE_SSL_PINNEDPUBKEYNOTMATCH 7.39.0 CURLE_SSL_SHUTDOWN_FAILED 7.16.1 CURLE_TELNET_OPTION_SYNTAX 7.7 CURLE_TFTP_DISKFULL 7.15.0 7.17.0 @@ -431,7 +427,6 @@ CURLOPT_PASSWDDATA 7.4.2 7.11.1 7.15.5 CURLOPT_PASSWDFUNCTION 7.4.2 7.11.1 7.15.5 CURLOPT_PASSWORD 7.19.1 CURLOPT_PASV_HOST 7.12.1 7.16.0 7.15.5 -CURLOPT_PINNEDPUBLICKEY 7.39.0 CURLOPT_PORT 7.1 CURLOPT_POST 7.1 CURLOPT_POST301 7.17.1 7.19.1 @@ -514,7 +509,6 @@ CURLOPT_SSL_OPTIONS 7.25.0 CURLOPT_SSL_SESSIONID_CACHE 7.16.0 CURLOPT_SSL_VERIFYHOST 7.8.1 CURLOPT_SSL_VERIFYPEER 7.4.2 -CURLOPT_SSL_VERIFYSTATUS 7.41.0 CURLOPT_STDERR 7.1 CURLOPT_TCP_KEEPALIVE 7.25.0 CURLOPT_TCP_KEEPIDLE 7.25.0 @@ -531,7 +525,6 @@ CURLOPT_TLSAUTH_TYPE 7.21.4 CURLOPT_TLSAUTH_USERNAME 7.21.4 CURLOPT_TRANSFERTEXT 7.1.1 CURLOPT_TRANSFER_ENCODING 7.21.6 -CURLOPT_UNIX_SOCKET_PATH 7.40.0 CURLOPT_UNRESTRICTED_AUTH 7.10.4 CURLOPT_UPLOAD 7.1 CURLOPT_URL 7.1 @@ -577,8 +570,6 @@ CURLPROTO_RTMPTS 7.21.0 CURLPROTO_RTSP 7.20.0 CURLPROTO_SCP 7.19.4 CURLPROTO_SFTP 7.19.4 -CURLPROTO_SMB 7.40.0 -CURLPROTO_SMBS 7.40.0 CURLPROTO_SMTP 7.20.0 CURLPROTO_SMTPS 7.20.0 CURLPROTO_TELNET 7.19.4 @@ -611,7 +602,6 @@ CURLSSH_AUTH_KEYBOARD 7.16.1 CURLSSH_AUTH_NONE 7.16.1 CURLSSH_AUTH_PASSWORD 7.16.1 CURLSSH_AUTH_PUBLICKEY 7.16.1 -CURLSSLBACKEND_AXTLS 7.38.0 CURLSSLBACKEND_CYASSL 7.34.0 CURLSSLBACKEND_DARWINSSL 7.34.0 CURLSSLBACKEND_GNUTLS 7.34.0 @@ -620,7 +610,7 @@ CURLSSLBACKEND_NONE 7.34.0 CURLSSLBACKEND_NSS 7.34.0 CURLSSLBACKEND_OPENSSL 7.34.0 CURLSSLBACKEND_POLARSSL 7.34.0 -CURLSSLBACKEND_QSOSSL 7.34.0 - 7.38.1 +CURLSSLBACKEND_QSOSSL 7.34.0 CURLSSLBACKEND_SCHANNEL 7.34.0 CURLSSLOPT_ALLOW_BEAST 7.25.0 CURLUSESSL_ALL 7.17.0 @@ -737,13 +727,11 @@ CURL_VERSION_ASYNCHDNS 7.10.7 CURL_VERSION_CONV 7.15.4 CURL_VERSION_CURLDEBUG 7.19.6 CURL_VERSION_DEBUG 7.10.6 -CURL_VERSION_GSSAPI 7.38.0 -CURL_VERSION_GSSNEGOTIATE 7.10.6 7.38.0 +CURL_VERSION_GSSNEGOTIATE 7.10.6 CURL_VERSION_HTTP2 7.33.0 CURL_VERSION_IDN 7.12.0 CURL_VERSION_IPV6 7.10 -CURL_VERSION_KERBEROS4 7.10 7.33.0 -CURL_VERSION_KERBEROS5 7.40.0 +CURL_VERSION_KERBEROS4 7.10 CURL_VERSION_LARGEFILE 7.11.1 CURL_VERSION_LIBZ 7.10 CURL_VERSION_NTLM 7.10.6 @@ -752,7 +740,6 @@ CURL_VERSION_SPNEGO 7.10.8 CURL_VERSION_SSL 7.10 CURL_VERSION_SSPI 7.13.2 CURL_VERSION_TLSAUTH_SRP 7.21.4 -CURL_VERSION_UNIX_SOCKETS 7.40.0 CURL_WAIT_POLLIN 7.28.0 CURL_WAIT_POLLOUT 7.28.0 CURL_WAIT_POLLPRI 7.28.0 diff --git a/docs/mk-ca-bundle.1 b/docs/mk-ca-bundle.1 index 7d38dba..aa38612 100644 --- a/docs/mk-ca-bundle.1 +++ b/docs/mk-ca-bundle.1 @@ -87,7 +87,7 @@ each certificate and output when run in plain text mode. Valid algorithms are: .RS -ALL, NONE, MD5 (default), SHA1, SHA256, SHA384, SHA512 +ALL, NONE, MD5 (default), SHA1, SHA256, SHA512 .RE .IP -u unlink (remove) certdata.txt after processing diff --git a/include/curl/curl.h b/include/curl/curl.h index 0a326d3..4e981fc 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -423,9 +423,7 @@ typedef enum { CURLE_FTP_WEIRD_PASV_REPLY, /* 13 */ CURLE_FTP_WEIRD_227_FORMAT, /* 14 */ CURLE_FTP_CANT_GET_HOST, /* 15 */ - CURLE_HTTP2, /* 16 - A problem in the http2 framing layer. - [was obsoleted in August 2007 for 7.17.0, - reused in July 2014 for 7.38.0] */ + CURLE_OBSOLETE16, /* 16 - NOT USED */ CURLE_FTP_COULDNT_SET_TYPE, /* 17 */ CURLE_PARTIAL_FILE, /* 18 */ CURLE_FTP_COULDNT_RETR_FILE, /* 19 */ @@ -521,19 +519,13 @@ typedef enum { CURLE_CHUNK_FAILED, /* 88 - chunk callback reported error */ CURLE_NO_CONNECTION_AVAILABLE, /* 89 - No connection available, the session will be queued */ - CURLE_SSL_PINNEDPUBKEYNOTMATCH, /* 90 - specified pinned public key did not - match */ - CURLE_SSL_INVALIDCERTSTATUS, /* 91 - invalid certificate status */ CURL_LAST /* never use! */ } CURLcode; #ifndef CURL_NO_OLDIES /* define this to test if your app builds with all the obsolete stuff removed! */ -/* Previously obsolete error code re-used in 7.38.0 */ -#define CURLE_OBSOLETE16 CURLE_HTTP2 - -/* Previously obsolete error codes re-used in 7.24.0 */ +/* Previously obsoletes error codes re-used in 7.24.0 */ #define CURLE_OBSOLETE10 CURLE_FTP_ACCEPT_FAILED #define CURLE_OBSOLETE12 CURLE_FTP_ACCEPT_TIMEOUT @@ -627,8 +619,7 @@ typedef enum { * CURLAUTH_NONE - No HTTP authentication * CURLAUTH_BASIC - HTTP Basic authentication (default) * CURLAUTH_DIGEST - HTTP Digest authentication - * CURLAUTH_NEGOTIATE - HTTP Negotiate (SPNEGO) authentication - * CURLAUTH_GSSNEGOTIATE - Alias for CURLAUTH_NEGOTIATE (deprecated) + * CURLAUTH_GSSNEGOTIATE - HTTP GSS-Negotiate authentication * CURLAUTH_NTLM - HTTP NTLM authentication * CURLAUTH_DIGEST_IE - HTTP Digest authentication with IE flavour * CURLAUTH_NTLM_WB - HTTP NTLM authentication delegated to winbind helper @@ -641,9 +632,7 @@ typedef enum { #define CURLAUTH_NONE ((unsigned long)0) #define CURLAUTH_BASIC (((unsigned long)1)<<0) #define CURLAUTH_DIGEST (((unsigned long)1)<<1) -#define CURLAUTH_NEGOTIATE (((unsigned long)1)<<2) -/* Deprecated since the advent of CURLAUTH_NEGOTIATE */ -#define CURLAUTH_GSSNEGOTIATE CURLAUTH_NEGOTIATE +#define CURLAUTH_GSSNEGOTIATE (((unsigned long)1)<<2) #define CURLAUTH_NTLM (((unsigned long)1)<<3) #define CURLAUTH_DIGEST_IE (((unsigned long)1)<<4) #define CURLAUTH_NTLM_WB (((unsigned long)1)<<5) @@ -806,8 +795,6 @@ typedef enum { #define CURLPROTO_RTMPS (1<<23) #define CURLPROTO_RTMPTS (1<<24) #define CURLPROTO_GOPHER (1<<25) -#define CURLPROTO_SMB (1<<26) -#define CURLPROTO_SMBS (1<<27) #define CURLPROTO_ALL (~0) /* enable everything */ /* long may be 32 or 64 bits, but we should never depend on anything else @@ -846,7 +833,7 @@ typedef enum { CINIT(WRITEDATA, OBJECTPOINT, 1), /* The full URL to get/put */ - CINIT(URL, OBJECTPOINT, 2), + CINIT(URL, OBJECTPOINT, 2), /* Port number to connect to, if other than default. */ CINIT(PORT, LONG, 3), @@ -990,7 +977,7 @@ typedef enum { CINIT(HEADER, LONG, 42), /* throw the header out too */ CINIT(NOPROGRESS, LONG, 43), /* shut off the progress meter */ CINIT(NOBODY, LONG, 44), /* use HEAD to get http document */ - CINIT(FAILONERROR, LONG, 45), /* no output on http error codes >= 400 */ + CINIT(FAILONERROR, LONG, 45), /* no output on http error codes >= 300 */ CINIT(UPLOAD, LONG, 46), /* this is an upload */ CINIT(POST, LONG, 47), /* HTTP POST method */ CINIT(DIRLISTONLY, LONG, 48), /* bare names when listing directories */ @@ -1616,16 +1603,6 @@ typedef enum { /* Pass in a bitmask of "header options" */ CINIT(HEADEROPT, LONG, 229), - /* The public key in DER form used to validate the peer public key - this option is used only if SSL_VERIFYPEER is true */ - CINIT(PINNEDPUBLICKEY, OBJECTPOINT, 230), - - /* Path to Unix domain socket */ - CINIT(UNIX_SOCKET_PATH, OBJECTPOINT, 231), - - /* Set if we should verify the certificate status. */ - CINIT(SSL_VERIFYSTATUS, LONG, 232), - CURLOPT_LASTENTRY /* the last unused */ } CURLoption; @@ -1662,8 +1639,8 @@ typedef enum { option might be handy to force libcurl to use a specific IP version. */ #define CURL_IPRESOLVE_WHATEVER 0 /* default, resolves addresses to all IP versions that your system allows */ -#define CURL_IPRESOLVE_V4 1 /* resolve to IPv4 addresses */ -#define CURL_IPRESOLVE_V6 2 /* resolve to IPv6 addresses */ +#define CURL_IPRESOLVE_V4 1 /* resolve to ipv4 addresses */ +#define CURL_IPRESOLVE_V6 2 /* resolve to ipv6 addresses */ /* three convenient "aliases" that follow the name scheme better */ #define CURLOPT_RTSPHEADER CURLOPT_HTTPHEADER @@ -2043,13 +2020,12 @@ typedef enum { CURLSSLBACKEND_OPENSSL = 1, CURLSSLBACKEND_GNUTLS = 2, CURLSSLBACKEND_NSS = 3, - CURLSSLBACKEND_OBSOLETE4 = 4, /* Was QSOSSL. */ + CURLSSLBACKEND_QSOSSL = 4, CURLSSLBACKEND_GSKIT = 5, CURLSSLBACKEND_POLARSSL = 6, CURLSSLBACKEND_CYASSL = 7, CURLSSLBACKEND_SCHANNEL = 8, - CURLSSLBACKEND_DARWINSSL = 9, - CURLSSLBACKEND_AXTLS = 10 + CURLSSLBACKEND_DARWINSSL = 9 } curl_sslbackend; /* Information about the SSL library used and the respective internal SSL @@ -2250,30 +2226,23 @@ typedef struct { } curl_version_info_data; -#define CURL_VERSION_IPV6 (1<<0) /* IPv6-enabled */ -#define CURL_VERSION_KERBEROS4 (1<<1) /* Kerberos V4 auth is supported - (deprecated) */ -#define CURL_VERSION_SSL (1<<2) /* SSL options are present */ -#define CURL_VERSION_LIBZ (1<<3) /* libz features are present */ -#define CURL_VERSION_NTLM (1<<4) /* NTLM auth is supported */ -#define CURL_VERSION_GSSNEGOTIATE (1<<5) /* Negotiate auth is supported - (deprecated) */ -#define CURL_VERSION_DEBUG (1<<6) /* Built with debug capabilities */ -#define CURL_VERSION_ASYNCHDNS (1<<7) /* Asynchronous DNS resolves */ -#define CURL_VERSION_SPNEGO (1<<8) /* SPNEGO auth is supported */ -#define CURL_VERSION_LARGEFILE (1<<9) /* Supports files larger than 2GB */ -#define CURL_VERSION_IDN (1<<10) /* Internationized Domain Names are - supported */ -#define CURL_VERSION_SSPI (1<<11) /* Built against Windows SSPI */ -#define CURL_VERSION_CONV (1<<12) /* Character conversions supported */ -#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 */ -#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 */ -#define CURL_VERSION_UNIX_SOCKETS (1<<19) /* Unix domain sockets support */ +#define CURL_VERSION_IPV6 (1<<0) /* IPv6-enabled */ +#define CURL_VERSION_KERBEROS4 (1<<1) /* kerberos auth is supported */ +#define CURL_VERSION_SSL (1<<2) /* SSL options are present */ +#define CURL_VERSION_LIBZ (1<<3) /* libz features are present */ +#define CURL_VERSION_NTLM (1<<4) /* NTLM auth is supported */ +#define CURL_VERSION_GSSNEGOTIATE (1<<5) /* Negotiate auth support */ +#define CURL_VERSION_DEBUG (1<<6) /* built with debug capabilities */ +#define CURL_VERSION_ASYNCHDNS (1<<7) /* asynchronous dns resolves */ +#define CURL_VERSION_SPNEGO (1<<8) /* SPNEGO auth */ +#define CURL_VERSION_LARGEFILE (1<<9) /* supports files bigger than 2GB */ +#define CURL_VERSION_IDN (1<<10) /* International Domain Names support */ +#define CURL_VERSION_SSPI (1<<11) /* SSPI is supported */ +#define CURL_VERSION_CONV (1<<12) /* character conversions supported */ +#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 delegating to winbind helper */ +#define CURL_VERSION_HTTP2 (1<<16) /* HTTP2 support built-in */ /* * NAME curl_version_info() diff --git a/include/curl/curlver.h b/include/curl/curlver.h index aca7c6c..ac23158 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * 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 @@ -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 - 2015 Daniel Stenberg, ." +#define LIBCURL_COPYRIGHT "1996 - 2014 Daniel Stenberg, ." /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.40.1-DEV" +#define LIBCURL_VERSION "7.38.0-DEV" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 -#define LIBCURL_VERSION_MINOR 40 -#define LIBCURL_VERSION_PATCH 1 +#define LIBCURL_VERSION_MINOR 38 +#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 @@ -53,7 +53,7 @@ and it is always a greater number in a more recent release. It makes comparisons with greater than and less than work. */ -#define LIBCURL_VERSION_NUM 0x072801 +#define LIBCURL_VERSION_NUM 0x072600 /* * This is the date and time when the full source package was created. The diff --git a/install-sh b/install-sh index 377bb86..a9244eb 100755 --- a/install-sh +++ b/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2011-11-20.07; # UTC +scriptversion=2011-01-19.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -35,7 +35,7 @@ scriptversion=2011-11-20.07; # UTC # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent -# 'make' implicit rules from creating a file called install from it +# `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written @@ -156,7 +156,7 @@ while test $# -ne 0; do -s) stripcmd=$stripprog;; -t) dst_arg=$2 - # Protect names problematic for 'test' and other utilities. + # Protect names problematic for `test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac @@ -190,7 +190,7 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then fi shift # arg dst_arg=$arg - # Protect names problematic for 'test' and other utilities. + # Protect names problematic for `test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac @@ -202,7 +202,7 @@ if test $# -eq 0; then echo "$0: no input file specified." >&2 exit 1 fi - # It's OK to call 'install-sh -d' without argument. + # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi @@ -240,7 +240,7 @@ fi for src do - # Protect names problematic for 'test' and other utilities. + # Protect names problematic for `test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac @@ -354,7 +354,7 @@ do if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. + # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index e7886ac..b2bcf09 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -48,6 +48,25 @@ endif() # ) # ENDIF(NOT HAVE_STRTOLL AND NOT HAVE__STRTOI64) +if(HAVE_FEATURES_H) + set_source_files_properties( + cookie.c + easy.c + formdata.c + getenv.c + nonblock.c + hash.c + http.c + if2ip.c + mprintf.c + multi.c + sendf.c + telnet.c + transfer.c + url.c + COMPILE_FLAGS -D_BSD_SOURCE) +endif(HAVE_FEATURES_H) + # The rest of the build @@ -57,7 +76,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../include) include_directories(${CMAKE_CURRENT_BINARY_DIR}/..) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) include_directories(${CMAKE_CURRENT_BINARY_DIR}) -if(USE_ARES) +if(CURL_USE_ARES) include_directories(${CARES_INCLUDE_DIR}) endif() @@ -87,6 +106,8 @@ endif() set_target_properties(${LIB_NAME} PROPERTIES COMPILE_DEFINITIONS BUILDING_LIBCURL) +setup_curl_dependencies(${LIB_NAME}) + # Remove the "lib" prefix since the library is already named "libcurl". set_target_properties(${LIB_NAME} PROPERTIES PREFIX "") set_target_properties(${LIB_NAME} PROPERTIES IMPORT_PREFIX "") diff --git a/lib/Makefile.Watcom b/lib/Makefile.Watcom index 14f5ac8..832ca01 100644 --- a/lib/Makefile.Watcom +++ b/lib/Makefile.Watcom @@ -60,7 +60,7 @@ 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 & - -dBUILDING_LIBCURL -I. -I"../include" $(SYS_INCL) + -dBUILDING_LIBCURL -dHAVE_SPNEGO=1 -I. -I"../include" $(SYS_INCL) !ifdef %debug DEBUG = -dDEBUG=1 -dDEBUGBUILD @@ -77,11 +77,6 @@ CFLAGS += -d_WIN32_WINNT=0x0501 -dENABLE_IPV6 CFLAGS += -dUSE_WINDOWS_SSPI !endif -!ifdef %use_winssl -CFLAGS += -dUSE_WINDOWS_SSPI -CFLAGS += -DUSE_SCHANNEL -!endif - !ifdef %use_winidn CFLAGS += -dWINVER=0x0600 -dUSE_WIN32_IDN ! if $(__VERSION__) <= 1290 @@ -113,7 +108,7 @@ LIBRTMP_ROOT = ../../rtmpdump-2.3 !ifdef %openssl_root OPENSSL_ROOT = $(%openssl_root) !else -OPENSSL_ROOT = ../../openssl-0.9.8zc +OPENSSL_ROOT = ../../openssl-0.9.8y !endif !ifdef %ares_root @@ -253,4 +248,4 @@ $(RESOURCE): libcurl.rc .c{$(OBJ_STAT)}.obj: $(CC) $(CFLAGS) -DCURL_STATICLIB $[@ -fo=$^@ - + \ No newline at end of file diff --git a/lib/Makefile.b32 b/lib/Makefile.b32 index b9531fd..9ad586a 100644 --- a/lib/Makefile.b32 +++ b/lib/Makefile.b32 @@ -27,7 +27,7 @@ ZLIB_PATH = ..\..\zlib-1.2.8 # Edit the path below to point to the base of your OpenSSL package. !ifndef OPENSSL_PATH -OPENSSL_PATH = ..\..\openssl-0.9.8zc +OPENSSL_PATH = ..\..\openssl-0.9.8y !endif # Set libcurl static lib, dll and import lib diff --git a/lib/Makefile.inc b/lib/Makefile.inc index 8f9d16d..462d72a 100644 --- a/lib/Makefile.inc +++ b/lib/Makefile.inc @@ -20,50 +20,50 @@ # ########################################################################### -LIB_VTLS_CFILES = vtls/openssl.c vtls/gtls.c vtls/vtls.c vtls/nss.c \ - vtls/polarssl.c vtls/polarssl_threadlock.c vtls/axtls.c \ +LIB_VTLS_CFILES = vtls/openssl.c vtls/gtls.c vtls/vtls.c vtls/nss.c \ + vtls/qssl.c vtls/polarssl.c vtls/polarssl_threadlock.c vtls/axtls.c \ vtls/cyassl.c vtls/curl_schannel.c vtls/curl_darwinssl.c vtls/gskit.c -LIB_VTLS_HFILES = vtls/openssl.h vtls/vtls.h vtls/gtls.h \ - vtls/nssg.h vtls/polarssl.h vtls/polarssl_threadlock.h vtls/axtls.h \ +LIB_VTLS_HFILES = vtls/qssl.h vtls/openssl.h vtls/vtls.h vtls/gtls.h \ + vtls/nssg.h vtls/polarssl.h vtls/polarssl_threadlock.h vtls/axtls.h \ vtls/cyassl.h vtls/curl_schannel.h vtls/curl_darwinssl.h vtls/gskit.h -LIB_CFILES = file.c timeval.c base64.c hostip.c progress.c formdata.c \ - cookie.c http.c sendf.c ftp.c url.c dict.c if2ip.c speedcheck.c \ - ldap.c version.c getenv.c escape.c mprintf.c telnet.c netrc.c \ - getinfo.c transfer.c strequal.c easy.c security.c curl_fnmatch.c \ - fileinfo.c ftplistparser.c wildcard.c krb5.c memdebug.c http_chunks.c \ - strtok.c connect.c llist.c hash.c multi.c content_encoding.c share.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 rawstr.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_negotiate_sspi.c http_proxy.c non-ascii.c asyn-ares.c \ - asyn-thread.c curl_gssapi.c curl_ntlm.c curl_ntlm_wb.c \ - curl_ntlm_core.c curl_ntlm_msgs.c curl_sasl.c curl_multibyte.c \ - hostcheck.c bundles.c conncache.c pipeline.c dotdot.c x509asn1.c \ - http2.c curl_sasl_sspi.c smb.c curl_sasl_gssapi.c curl_endian.c +LIB_CFILES = file.c timeval.c base64.c hostip.c progress.c formdata.c \ + cookie.c http.c sendf.c ftp.c url.c dict.c if2ip.c speedcheck.c \ + ldap.c version.c getenv.c escape.c mprintf.c telnet.c netrc.c \ + getinfo.c transfer.c strequal.c easy.c security.c curl_fnmatch.c \ + fileinfo.c ftplistparser.c wildcard.c krb5.c memdebug.c http_chunks.c \ + strtok.c connect.c llist.c hash.c multi.c content_encoding.c share.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 rawstr.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_negotiate_sspi.c http_proxy.c non-ascii.c asyn-ares.c \ + asyn-thread.c curl_gssapi.c curl_ntlm.c curl_ntlm_wb.c \ + curl_ntlm_core.c curl_ntlm_msgs.c curl_sasl.c curl_multibyte.c \ + hostcheck.c bundles.c conncache.c pipeline.c dotdot.c x509asn1.c \ + http2.c curl_sasl_sspi.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 \ - speedcheck.h urldata.h curl_ldap.h escape.h telnet.h getinfo.h \ - strequal.h curl_sec.h memdebug.h http_chunks.h curl_fnmatch.h \ - wildcard.h fileinfo.h ftplistparser.h strtok.h connect.h llist.h \ - hash.h content_encoding.h share.h curl_md4.h curl_md5.h http_digest.h \ - http_negotiate.h inet_pton.h amigaos.h strtoofft.h strerror.h \ - inet_ntop.h curlx.h curl_memory.h curl_setup.h transfer.h select.h \ - easyif.h multiif.h parsedate.h tftp.h sockaddr.h splay.h strdup.h \ - socks.h ssh.h curl_base64.h rawstr.h curl_addrinfo.h curl_sspi.h \ - slist.h nonblock.h curl_memrchr.h imap.h pop3.h smtp.h pingpong.h \ - rtsp.h curl_threads.h warnless.h curl_hmac.h curl_rtmp.h \ - curl_gethostname.h gopher.h http_proxy.h non-ascii.h asyn.h \ - curl_ntlm.h curl_gssapi.h curl_ntlm_wb.h curl_ntlm_core.h \ - curl_ntlm_msgs.h curl_sasl.h curl_multibyte.h hostcheck.h bundles.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 +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 \ + speedcheck.h urldata.h curl_ldap.h escape.h telnet.h getinfo.h \ + strequal.h curl_sec.h memdebug.h http_chunks.h curl_fnmatch.h \ + wildcard.h fileinfo.h ftplistparser.h strtok.h connect.h llist.h \ + hash.h content_encoding.h share.h curl_md4.h curl_md5.h http_digest.h \ + http_negotiate.h inet_pton.h amigaos.h strtoofft.h strerror.h \ + inet_ntop.h curlx.h curl_memory.h curl_setup.h transfer.h select.h \ + easyif.h multiif.h parsedate.h tftp.h sockaddr.h splay.h strdup.h \ + socks.h ssh.h curl_base64.h rawstr.h curl_addrinfo.h curl_sspi.h \ + slist.h nonblock.h curl_memrchr.h imap.h pop3.h smtp.h pingpong.h \ + rtsp.h curl_threads.h warnless.h curl_hmac.h curl_rtmp.h \ + curl_gethostname.h gopher.h http_proxy.h non-ascii.h asyn.h \ + curl_ntlm.h curl_gssapi.h curl_ntlm_wb.h curl_ntlm_core.h \ + curl_ntlm_msgs.h curl_sasl.h curl_multibyte.h hostcheck.h bundles.h \ + conncache.h curl_setup_once.h multihandle.h setup-vms.h pipeline.h \ + dotdot.h x509asn1.h http2.h sigpipe.h LIB_RCFILES = libcurl.rc diff --git a/lib/Makefile.m32 b/lib/Makefile.m32 index 92bdb1f..afe3982 100644 --- a/lib/Makefile.m32 +++ b/lib/Makefile.m32 @@ -18,7 +18,7 @@ ZLIB_PATH = ../../zlib-1.2.8 endif # Edit the path below to point to the base of your OpenSSL package. ifndef OPENSSL_PATH -OPENSSL_PATH = ../../openssl-0.9.8zc +OPENSSL_PATH = ../../openssl-0.9.8y endif # Edit the path below to point to the base of your LibSSH2 package. ifndef LIBSSH2_PATH @@ -42,10 +42,6 @@ endif ifndef LDAP_SDK LDAP_SDK = c:/novell/ndk/cldapsdk/win32 endif -# Edit the path below to point to the base of your nghttp2 package. -ifndef NGHTTP2_PATH -NGHTTP2_PATH = ../../nghttp2-0.6.7 -endif PROOT = .. @@ -54,34 +50,25 @@ ifndef LIBCARES_PATH LIBCARES_PATH = $(PROOT)/ares endif +# Edit the var below to set to your architecture or set environment var. +ifndef ARCH +ARCH = w32 +endif + CC = $(CROSSPREFIX)gcc -CFLAGS = $(CURL_CFLAG_EXTRAS) -g -O2 -Wall +CFLAGS = -g -O2 -Wall CFLAGS += -fno-strict-aliasing +ifeq ($(ARCH),w64) +CFLAGS += -D_AMD64_ +endif # comment LDFLAGS below to keep debug info LDFLAGS = -s AR = $(CROSSPREFIX)ar RANLIB = $(CROSSPREFIX)ranlib RC = $(CROSSPREFIX)windres -RCFLAGS = --include-dir=$(PROOT)/include -DDEBUGBUILD=0 -O COFF +RCFLAGS = --include-dir=$(PROOT)/include -DDEBUGBUILD=0 -O COFF -i STRIP = $(CROSSPREFIX)strip -g -# Set environment var ARCH to your architecture to override autodetection. -ifndef ARCH -ifeq ($(findstring x86_64,$(shell $(CC) -dumpmachine)),x86_64) -ARCH = w64 -else -ARCH = w32 -endif -endif - -ifeq ($(ARCH),w64) -CFLAGS += -m64 -D_AMD64_ -RCFLAGS += -F pe-x86-64 -else -CFLAGS += -m32 -RCFLAGS += -F pe-i386 -endif - # Platform-dependent helper tool macros ifeq ($(findstring /sh,$(SHELL)),/sh) DEL = rm -f $1 @@ -150,6 +137,9 @@ endif ifeq ($(findstring -sspi,$(CFG)),-sspi) SSPI = 1 endif +ifeq ($(findstring -spnego,$(CFG)),-spnego) +SPNEGO = 1 +endif ifeq ($(findstring -ldaps,$(CFG)),-ldaps) LDAPS = 1 endif @@ -160,9 +150,6 @@ ifeq ($(findstring -winssl,$(CFG)),-winssl) WINSSL = 1 SSPI = 1 endif -ifeq ($(findstring -nghttp2,$(CFG)),-nghttp2) -NGHTTP2 = 1 -endif INCLUDES = -I. -I../include CFLAGS += -DBUILDING_LIBCURL @@ -182,11 +169,6 @@ ifdef RTMP CFLAGS += -DUSE_LIBRTMP DLL_LIBS += -L"$(LIBRTMP_PATH)/librtmp" -lrtmp -lwinmm endif -ifdef NGHTTP2 - INCLUDES += -I"$(NGHTTP2_PATH)/include" - CFLAGS += -DUSE_NGHTTP2 - DLL_LIBS += -L"$(NGHTTP2_PATH)/lib" -lnghttp2 -endif ifdef SSH2 INCLUDES += -I"$(LIBSSH2_PATH)/include" -I"$(LIBSSH2_PATH)/win32" CFLAGS += -DUSE_LIBSSH2 -DHAVE_LIBSSH2_H @@ -306,7 +288,7 @@ $(libcurl_dll_LIBRARY): $(libcurl_a_OBJECTS) $(RESOURCE) $(libcurl_dll_DEPENDENC $(CC) $(INCLUDES) $(CFLAGS) -c $< -o $@ %.res: %.rc - $(RC) $(RCFLAGS) -i $< -o $@ + $(RC) $(RCFLAGS) $< -o $@ clean: ifeq "$(wildcard $(PROOT)/include/curl/curlbuild.h.dist)" "$(PROOT)/include/curl/curlbuild.h.dist" @@ -323,3 +305,5 @@ $(PROOT)/include/curl/curlbuild.h: $(LIBCARES_PATH)/libcares.a: $(MAKE) -C $(LIBCARES_PATH) -f Makefile.m32 + + diff --git a/lib/Makefile.netware b/lib/Makefile.netware index 2cd754a..bafd32f 100644 --- a/lib/Makefile.netware +++ b/lib/Makefile.netware @@ -19,7 +19,7 @@ endif # Edit the path below to point to the base of your OpenSSL package. ifndef OPENSSL_PATH -OPENSSL_PATH = ../../openssl-0.9.8zc +OPENSSL_PATH = ../../openssl-0.9.8y endif # Edit the path below to point to the base of your LibSSH2 package. @@ -42,11 +42,6 @@ ifndef LIBRTMP_PATH LIBRTMP_PATH = ../../librtmp-2.3 endif -# Edit the path below to point to the base of your nghttp2 package. -ifndef NGHTTP2_PATH -NGHTTP2_PATH = ../../nghttp2-0.6.7 -endif - # Edit the path below to point to the base of your fbopenssl package. ifndef FBOPENSSL_PATH FBOPENSSL_PATH = ../../fbopenssl-0.4 @@ -214,11 +209,6 @@ WITH_SSL = else ifeq ($(findstring -ssl,$(CFG)),-ssl) WITH_SSL = 1 -ifeq ($(findstring -srp,$(CFG)),-srp) -ifeq "$(wildcard $(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L)/openssl/srp.h)" "$(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L)/openssl/srp.h" -WITH_SRP = 1 -endif -endif endif endif ifeq ($(findstring -zlib,$(CFG)),-zlib) @@ -227,8 +217,8 @@ endif ifeq ($(findstring -idn,$(CFG)),-idn) WITH_IDN = 1 endif -ifeq ($(findstring -nghttp2,$(CFG)),-nghttp2) -WITH_NGHTTP2 = 1 +ifeq ($(findstring -spnego,$(CFG)),-spnego) +WITH_SPNEGO = 1 endif ifeq ($(findstring -ipv6,$(CFG)),-ipv6) ENABLE_IPV6 = 1 @@ -257,6 +247,10 @@ ifdef WITH_SSL LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/crypto.$(LIBEXT) IMPORTS += GetProcessSwitchCount RunningProcess INSTDEP += ca-bundle.crt +ifdef WITH_SPNEGO + INCLUDES += -I$(FBOPENSSL_PATH)/include + LDLIBS += $(FBOPENSSL_PATH)/nw/fbopenssl.$(LIBEXT) +endif else ifdef WITH_AXTLS INCLUDES += -I$(AXTLS_PATH)/inc @@ -282,10 +276,6 @@ ifdef WITH_IDN INCLUDES += -I$(LIBIDN_PATH)/include LDLIBS += $(LIBIDN_PATH)/lib/libidn.$(LIBEXT) endif -ifdef WITH_NGHTTP2 - INCLUDES += -I$(NGHTTP2_PATH)/include - LDLIBS += $(NGHTTP2_PATH)/lib/libnghttp2.$(LIBEXT) -endif ifeq ($(LIBARCH),LIBC) INCLUDES += -I$(NDK_LIBC)/include @@ -643,10 +633,6 @@ ifdef WITH_SSL @echo $(DL)#define HAVE_LIBSSL 1$(DL) >> $@ @echo $(DL)#define HAVE_LIBCRYPTO 1$(DL) >> $@ @echo $(DL)#define OPENSSL_NO_KRB5 1$(DL) >> $@ -ifdef WITH_SRP - @echo $(DL)#define HAVE_SSLEAY_SRP 1$(DL) >> $@ - @echo $(DL)#define USE_TLS_SRP 1$(DL) >> $@ -endif ifdef WITH_SPNEGO @echo $(DL)#define HAVE_SPNEGO 1$(DL) >> $@ endif @@ -666,9 +652,6 @@ endif ifdef WITH_RTMP @echo $(DL)#define USE_LIBRTMP 1$(DL) >> $@ endif -ifdef WITH_NGHTTP2 - @echo $(DL)#define USE_NGHTTP2 1$(DL) >> $@ -endif @echo $(DL)#ifdef __GNUC__$(DL) >> $@ @echo $(DL)#define HAVE_VARIADIC_MACROS_GCC 1$(DL) >> $@ @echo $(DL)#else$(DL) >> $@ @@ -699,11 +682,6 @@ ifdef WITH_SSL else @echo SSL support: no endif -ifdef WITH_SRP - @echo SRP support: enabled -else - @echo SRP support: no -endif ifdef WITH_SSH2 @echo SSH2 support: enabled (libssh2) else @@ -714,20 +692,15 @@ ifdef WITH_ZLIB else @echo zlib support: no endif -ifdef WITH_NGHTTP2 - @echo http2 support: enabled -else - @echo http2 support: no -endif ifdef WITH_ARES @echo c-ares support: enabled else @echo c-ares support: no endif ifdef ENABLE_IPV6 - @echo IPv6 support: enabled + @echo ipv6 support: enabled else - @echo IPv6 support: no + @echo ipv6 support: no endif $(CURL_INC)/curl/curlbuild.h: Makefile.netware FORCE diff --git a/lib/Makefile.vc6 b/lib/Makefile.vc6 index ee20ebe..2a80fc4 100644 --- a/lib/Makefile.vc6 +++ b/lib/Makefile.vc6 @@ -65,7 +65,7 @@ !INCLUDE ..\winbuild\Makefile.msvc.names !IFNDEF OPENSSL_PATH -OPENSSL_PATH = ../../openssl-0.9.8zc +OPENSSL_PATH = ../../openssl-0.9.8y !ENDIF !IFNDEF LIBSSH2_PATH @@ -130,10 +130,6 @@ CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include CFLAGS = $(CFLAGS) /DUSE_IPV6 !ENDIF -!IFDEF USE_IDN -CFLAGS = $(CFLAGS) /DUSE_WIN32_IDN /DWANT_IDN_PROTOTYPES -!ENDIF - ############################################################## # Runtime library configuration @@ -535,7 +531,6 @@ X_OBJS= \ $(DIROBJ)\cookie.obj \ $(DIROBJ)\curl_addrinfo.obj \ $(DIROBJ)\curl_darwinssl.obj \ - $(DIROBJ)\curl_endian.obj \ $(DIROBJ)\curl_fnmatch.obj \ $(DIROBJ)\curl_gethostname.obj \ $(DIROBJ)\curl_gssapi.obj \ @@ -547,7 +542,6 @@ X_OBJS= \ $(DIROBJ)\curl_ntlm_wb.obj \ $(DIROBJ)\curl_rtmp.obj \ $(DIROBJ)\curl_sasl.obj \ - $(DIROBJ)\curl_sasl_gssapi.obj \ $(DIROBJ)\curl_sasl_sspi.obj \ $(DIROBJ)\curl_schannel.obj \ $(DIROBJ)\curl_sspi.obj \ @@ -605,6 +599,7 @@ X_OBJS= \ $(DIROBJ)\polarssl_threadlock.obj \ $(DIROBJ)\pop3.obj \ $(DIROBJ)\progress.obj \ + $(DIROBJ)\qssl.obj \ $(DIROBJ)\rawstr.obj \ $(DIROBJ)\rtsp.obj \ $(DIROBJ)\security.obj \ @@ -612,7 +607,6 @@ X_OBJS= \ $(DIROBJ)\sendf.obj \ $(DIROBJ)\share.obj \ $(DIROBJ)\slist.obj \ - $(DIROBJ)\smb.obj \ $(DIROBJ)\smtp.obj \ $(DIROBJ)\socks.obj \ $(DIROBJ)\socks_gssapi.obj \ diff --git a/lib/Makefile.vxworks b/lib/Makefile.vxworks index 7ff197f..0f9de51 100644 --- a/lib/Makefile.vxworks +++ b/lib/Makefile.vxworks @@ -33,8 +33,8 @@ BUILD_TYPE := debug USER_CFLAGS:= # directories where to seek for includes and libraries -OPENSSL_INC := D:/libraries/openssl/openssl-0.9.8zc-vxWorks6.3/include -OPENSSL_LIB := D:/libraries/openssl/openssl-0.9.8zc-vxWorks6.3 +OPENSSL_INC := D:/libraries/openssl/openssl-0.9.8y-vxWorks6.3/include +OPENSSL_LIB := D:/libraries/openssl/openssl-0.9.8y-vxWorks6.3 ZLIB_INC := D:/libraries/zlib/zlib-1.2.8-VxWorks6.3/zlib-1.2.8 ZLIB_LIB := D:/libraries/zlib/zlib-1.2.8-VxWorks6.3/binaries/vxworks_3.1_gnu/Debug/lib ARES_INC := diff --git a/lib/README.hostip b/lib/README.hostip index d5688ff..03d8966 100644 --- a/lib/README.hostip +++ b/lib/README.hostip @@ -28,8 +28,8 @@ hostsyn.c - functions for synchronous name resolves asyn-ares.c - functions for asynchronous name resolves using c-ares asyn-thread.c - functions for asynchronous name resolves using threads - hostip4.c - IPv4 specific functions - hostip6.c - IPv6 specific functions + hostip4.c - ipv4-specific functions + hostip6.c - ipv6-specific functions The hostip.h is the single united header file for all this. It defines the CURLRES_* defines based on the config*.h and curl_setup.h defines. diff --git a/lib/README.http2 b/lib/README.http2 index 936e3bb..3e9ba20 100644 --- a/lib/README.http2 +++ b/lib/README.http2 @@ -5,7 +5,7 @@ HTTP2 with libcurl Build prerequisites - nghttp2 - - OpenSSL, NSS, GnutTLS or PolarSSL with a new enough version + - OpenSSL or NSS or GnutTLS with a new enough version nghttp2 (https://github.com/tatsuhiro-t/nghttp2) @@ -14,9 +14,9 @@ HTTP2 with libcurl than HTTP1.1 (which we implement on our own) and that nghttp2 is an already existing and well functional library. - Right now, nghttp2 implements http2 draft-14 + Right now, nghttp2 implements http2 draft-09 - We require at least version 0.6.0 + We require at least version 0.3.0 Over an http:// URL @@ -46,10 +46,9 @@ SSL libs backends. You may need a fairly updated SSL library version for it to provide the necessary TLS features. Right now we support: - OpenSSL: ALPN and NPN - NSS: ALPN and NPN - GnuTLS: ALPN - PolarSSL: ALPN + OpenSSL: ALPN and NPN + NSS: ALPN and NPN + GnuTLS: ALPN Alt-Svc diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c index 4404b6c..d651c25 100644 --- a/lib/asyn-ares.c +++ b/lib/asyn-ares.c @@ -178,7 +178,7 @@ static void destroy_async_data (struct Curl_async *async); */ void Curl_resolver_cancel(struct connectdata *conn) { - if(conn->data && conn->data->state.resolver) + if(conn && conn->data && conn->data->state.resolver) ares_cancel((ares_channel)conn->data->state.resolver); destroy_async_data(&conn->async); } @@ -235,7 +235,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); return max; } @@ -315,7 +315,7 @@ CURLcode Curl_resolver_is_resolved(struct connectdata *conn, struct SessionHandle *data = conn->data; struct ResolverResults *res = (struct ResolverResults *) conn->async.os_specific; - CURLcode result = CURLE_OK; + CURLcode rc = CURLE_OK; *dns = NULL; @@ -329,7 +329,7 @@ CURLcode Curl_resolver_is_resolved(struct connectdata *conn, if(!conn->async.dns) { failf(data, "Could not resolve: %s (%s)", conn->async.hostname, ares_strerror(conn->async.status)); - result = conn->bits.proxy?CURLE_COULDNT_RESOLVE_PROXY: + rc = conn->bits.proxy?CURLE_COULDNT_RESOLVE_PROXY: CURLE_COULDNT_RESOLVE_HOST; } else @@ -338,7 +338,7 @@ CURLcode Curl_resolver_is_resolved(struct connectdata *conn, destroy_async_data(&conn->async); } - return result; + return rc; } /* @@ -355,7 +355,7 @@ CURLcode Curl_resolver_is_resolved(struct connectdata *conn, CURLcode Curl_resolver_wait_resolv(struct connectdata *conn, struct Curl_dns_entry **entry) { - CURLcode result = CURLE_OK; + CURLcode rc=CURLE_OK; struct SessionHandle *data = conn->data; long timeout; struct timeval now = Curl_tvnow(); @@ -394,7 +394,7 @@ CURLcode Curl_resolver_wait_resolv(struct connectdata *conn, break; if(Curl_pgrsUpdate(conn)) { - result = CURLE_ABORTED_BY_CALLBACK; + rc = CURLE_ABORTED_BY_CALLBACK; timeout = -1; /* trigger the cancel below */ } else { @@ -403,7 +403,6 @@ CURLcode Curl_resolver_wait_resolv(struct connectdata *conn, timeout -= timediff?timediff:1; /* always deduct at least 1 */ now = now2; /* for next loop */ } - if(timeout < 0) { /* our timeout, so we cancel the ares operation */ ares_cancel((ares_channel)data->state.resolver); @@ -413,17 +412,18 @@ CURLcode Curl_resolver_wait_resolv(struct connectdata *conn, /* Operation complete, if the lookup was successful we now have the entry in the cache. */ + if(entry) *entry = conn->async.dns; - if(result) + if(rc) /* close the connection, since we can't return failure here without cleaning up this connection properly. TODO: remove this action from here, it is not a name resolver decision. */ connclose(conn, "c-ares resolve failed"); - return result; + return rc; } /* Connects results to the list */ @@ -669,7 +669,7 @@ CURLcode Curl_set_dns_local_ip4(struct SessionHandle *data, CURLcode Curl_set_dns_local_ip6(struct SessionHandle *data, const char *local_ip6) { -#if (ARES_VERSION >= 0x010704) && defined(ENABLE_IPV6) +#if (ARES_VERSION >= 0x010704) unsigned char a6[INET6_ADDRSTRLEN]; if((!local_ip6) || (local_ip6[0] == 0)) { diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c index 80b5e78..31a3132 100644 --- a/lib/asyn-thread.c +++ b/lib/asyn-thread.c @@ -166,7 +166,6 @@ struct thread_sync_data { #ifdef HAVE_GETADDRINFO struct addrinfo hints; #endif - struct thread_data *td; /* for thread-self cleanup */ }; struct thread_data { @@ -203,16 +202,13 @@ void destroy_thread_sync_data(struct thread_sync_data * tsd) /* Initialize resolver thread synchronization data */ static -int init_thread_sync_data(struct thread_data * td, +int init_thread_sync_data(struct thread_sync_data * tsd, const char * hostname, int port, const struct addrinfo *hints) { - struct thread_sync_data *tsd = &td->tsd; - memset(tsd, 0, sizeof(*tsd)); - tsd->td = td; tsd->port = port; #ifdef HAVE_GETADDRINFO DEBUGASSERT(hints); @@ -270,7 +266,6 @@ static int getaddrinfo_complete(struct connectdata *conn) static unsigned int CURL_STDCALL getaddrinfo_thread (void *arg) { struct thread_sync_data *tsd = (struct thread_sync_data*)arg; - struct thread_data *td = tsd->td; char service[12]; int rc; @@ -285,16 +280,8 @@ static unsigned int CURL_STDCALL getaddrinfo_thread (void *arg) } Curl_mutex_acquire(tsd->mtx); - if(tsd->done) { - /* too late, gotta clean up the mess */ - Curl_mutex_release(tsd->mtx); - destroy_thread_sync_data(tsd); - free(td); - } - else { - tsd->done = 1; - Curl_mutex_release(tsd->mtx); - } + tsd->done = 1; + Curl_mutex_release(tsd->mtx); return 0; } @@ -307,7 +294,6 @@ static unsigned int CURL_STDCALL getaddrinfo_thread (void *arg) static unsigned int CURL_STDCALL gethostbyname_thread (void *arg) { struct thread_sync_data *tsd = (struct thread_sync_data *)arg; - struct thread_data *td = tsd->td; tsd->res = Curl_ipv4_resolve_r(tsd->hostname, tsd->port); @@ -318,16 +304,8 @@ static unsigned int CURL_STDCALL gethostbyname_thread (void *arg) } Curl_mutex_acquire(tsd->mtx); - if(tsd->done) { - /* too late, gotta clean up the mess */ - Curl_mutex_release(tsd->mtx); - destroy_thread_sync_data(tsd); - free(td); - } - else { - tsd->done = 1; - Curl_mutex_release(tsd->mtx); - } + tsd->done = 1; + Curl_mutex_release(tsd->mtx); return 0; } @@ -339,37 +317,21 @@ static unsigned int CURL_STDCALL gethostbyname_thread (void *arg) */ static void destroy_async_data (struct Curl_async *async) { + if(async->hostname) + free(async->hostname); + if(async->os_specific) { struct thread_data *td = (struct thread_data*) async->os_specific; - int done; - - /* - * if the thread is still blocking in the resolve syscall, detach it and - * let the thread do the cleanup... - */ - Curl_mutex_acquire(td->tsd.mtx); - done = td->tsd.done; - td->tsd.done = 1; - Curl_mutex_release(td->tsd.mtx); - - if(!done) { - Curl_thread_destroy(td->thread_hnd); - } - else { - if(td->thread_hnd != curl_thread_t_null) - Curl_thread_join(&td->thread_hnd); - destroy_thread_sync_data(&td->tsd); + if(td->thread_hnd != curl_thread_t_null) + Curl_thread_join(&td->thread_hnd); - free(async->os_specific); - } - } - async->os_specific = NULL; - - if(async->hostname) - free(async->hostname); + destroy_thread_sync_data(&td->tsd); + free(async->os_specific); + } async->hostname = NULL; + async->os_specific = NULL; } /* @@ -395,7 +357,7 @@ 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)) + if(!init_thread_sync_data(&td->tsd, hostname, port, hints)) goto err_exit; Curl_safefree(conn->async.hostname); @@ -434,21 +396,19 @@ static bool init_resolve_thread (struct connectdata *conn, static CURLcode resolver_error(struct connectdata *conn) { const char *host_or_proxy; - CURLcode result; - + CURLcode rc; if(conn->bits.httpproxy) { host_or_proxy = "proxy"; - result = CURLE_COULDNT_RESOLVE_PROXY; + rc = CURLE_COULDNT_RESOLVE_PROXY; } else { host_or_proxy = "host"; - result = CURLE_COULDNT_RESOLVE_HOST; + rc = CURLE_COULDNT_RESOLVE_HOST; } failf(conn->data, "Could not resolve %s: %s", host_or_proxy, conn->async.hostname); - - return result; + return rc; } /* @@ -465,13 +425,13 @@ CURLcode Curl_resolver_wait_resolv(struct connectdata *conn, struct Curl_dns_entry **entry) { struct thread_data *td = (struct thread_data*) conn->async.os_specific; - CURLcode result = CURLE_OK; + CURLcode rc = CURLE_OK; DEBUGASSERT(conn && td); /* wait for the thread to resolve the name */ if(Curl_thread_join(&td->thread_hnd)) - result = getaddrinfo_complete(conn); + rc = getaddrinfo_complete(conn); else DEBUGASSERT(0); @@ -482,14 +442,14 @@ CURLcode Curl_resolver_wait_resolv(struct connectdata *conn, if(!conn->async.dns) /* a name was not resolved, report error */ - result = resolver_error(conn); + rc = resolver_error(conn); destroy_async_data(&conn->async); if(!conn->async.dns) connclose(conn, "asynch resolve failed"); - return result; + return (rc); } /* @@ -519,9 +479,9 @@ CURLcode Curl_resolver_is_resolved(struct connectdata *conn, getaddrinfo_complete(conn); if(!conn->async.dns) { - CURLcode result = resolver_error(conn); + CURLcode rc = resolver_error(conn); destroy_async_data(&conn->async); - return result; + return rc; } destroy_async_data(&conn->async); *entry = conn->async.dns; @@ -635,7 +595,7 @@ Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn, } if((pf != PF_INET) && !Curl_ipv6works()) - /* The stack seems to be a non-IPv6 one */ + /* the stack seems to be a non-ipv6 one */ pf = PF_INET; #endif /* CURLRES_IPV6 */ diff --git a/lib/base64.c b/lib/base64.c index 6b1eb7c..a941cc7 100644 --- a/lib/base64.c +++ b/lib/base64.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , 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,29 +37,24 @@ #include "memdebug.h" /* ---- Base64 Encoding/Decoding Table --- */ -static const char base64[]= +static const char table64[]= "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -/* The Base 64 encoding with an URL and filename safe alphabet, RFC 4648 - section 5 */ -static const char base64url[]= - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; - static size_t decodeQuantum(unsigned char *dest, const char *src) { size_t padding = 0; const char *s, *p; - unsigned long i, x = 0; + unsigned long i, v, x = 0; for(i = 0, s = src; i < 4; i++, s++) { - unsigned long v = 0; + v = 0; if(*s == '=') { x = (x << 6); padding++; } else { - p = base64; + p = table64; while(*p && (*p != *s)) { v++; @@ -107,6 +102,7 @@ CURLcode Curl_base64_decode(const char *src, size_t length = 0; size_t padding = 0; size_t i; + size_t result; size_t numQuantums; size_t rawlen = 0; unsigned char *pos; @@ -150,7 +146,7 @@ CURLcode Curl_base64_decode(const char *src, /* Decode the quantums */ for(i = 0; i < numQuantums; i++) { - size_t result = decodeQuantum(pos, src); + result = decodeQuantum(pos, src); if(!result) { Curl_safefree(newstr); @@ -171,10 +167,26 @@ CURLcode Curl_base64_decode(const char *src, return CURLE_OK; } -static CURLcode base64_encode(const char *table64, - struct SessionHandle *data, - const char *inputbuff, size_t insize, - char **outptr, size_t *outlen) +/* + * Curl_base64_encode() + * + * Given a pointer to an input buffer and an input size, encode it and + * return a pointer in *outptr to a newly allocated memory area holding + * encoded data. Size of encoded data is returned in variable pointed by + * outlen. + * + * Input length of 0 indicates input buffer holds a NUL-terminated string. + * + * Returns CURLE_OK on success, otherwise specific error code. Function + * output shall not be considered valid unless CURLE_OK is returned. + * + * When encoded data length is 0, returns NULL in *outptr. + * + * @unittest: 1302 + */ +CURLcode Curl_base64_encode(struct SessionHandle *data, + const char *inputbuff, size_t insize, + char **outptr, size_t *outlen) { CURLcode error; unsigned char ibuf[3]; @@ -262,52 +274,4 @@ static CURLcode base64_encode(const char *table64, return CURLE_OK; } - -/* - * Curl_base64_encode() - * - * Given a pointer to an input buffer and an input size, encode it and - * return a pointer in *outptr to a newly allocated memory area holding - * encoded data. Size of encoded data is returned in variable pointed by - * outlen. - * - * Input length of 0 indicates input buffer holds a NUL-terminated string. - * - * Returns CURLE_OK on success, otherwise specific error code. Function - * output shall not be considered valid unless CURLE_OK is returned. - * - * When encoded data length is 0, returns NULL in *outptr. - * - * @unittest: 1302 - */ -CURLcode Curl_base64_encode(struct SessionHandle *data, - const char *inputbuff, size_t insize, - char **outptr, size_t *outlen) -{ - return base64_encode(base64, data, inputbuff, insize, outptr, outlen); -} - -/* - * Curl_base64url_encode() - * - * Given a pointer to an input buffer and an input size, encode it and - * return a pointer in *outptr to a newly allocated memory area holding - * encoded data. Size of encoded data is returned in variable pointed by - * outlen. - * - * Input length of 0 indicates input buffer holds a NUL-terminated string. - * - * Returns CURLE_OK on success, otherwise specific error code. Function - * output shall not be considered valid unless CURLE_OK is returned. - * - * When encoded data length is 0, returns NULL in *outptr. - * - * @unittest: 1302 - */ -CURLcode Curl_base64url_encode(struct SessionHandle *data, - const char *inputbuff, size_t insize, - char **outptr, size_t *outlen) -{ - return base64_encode(base64url, data, inputbuff, insize, outptr, outlen); -} /* ---- End of Base64 Encoding ---- */ diff --git a/lib/config-dos.h b/lib/config-dos.h index dd5b06d..cce5e81 100644 --- a/lib/config-dos.h +++ b/lib/config-dos.h @@ -69,6 +69,7 @@ #define HAVE_SETMODE 1 #define HAVE_SIGNAL 1 #define HAVE_SOCKET 1 +#define HAVE_SPNEGO 1 #define HAVE_STRDUP 1 #define HAVE_STRICMP 1 #define HAVE_STRTOLL 1 diff --git a/lib/config-os400.h b/lib/config-os400.h index 1e62228..8896277 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 - 2013, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -175,15 +175,6 @@ /* Define if you have GSS API. */ #define HAVE_GSSAPI -/* Define if you have the GNU gssapi libraries */ -#undef HAVE_GSSGNU - -/* Define if you have the Heimdal gssapi libraries */ -#define HAVE_GSSHEIMDAL - -/* Define if you have the MIT gssapi libraries */ -#undef HAVE_GSSMIT - /* Define if you have the `ucb' library (-lucb). */ #undef HAVE_LIBUCB @@ -537,15 +528,12 @@ /* Define to the function return type for send. */ #define SEND_TYPE_RETV int +/* Define to use the QsoSSL package. */ +#undef USE_QSOSSL + /* Define to use the GSKit package. */ #define USE_GSKIT -/* Define to use the OS/400 crypto library. */ -#define USE_OS400CRYPTO - -/* Define to use Unix sockets. */ -#define USE_UNIX_SOCKETS - /* Use the system keyring as the default CA bundle. */ #define CURL_CA_BUNDLE "/QIBM/UserData/ICSS/Cert/Server/DEFAULT.KDB" diff --git a/lib/config-symbian.h b/lib/config-symbian.h index f7eaab9..17d92b0 100644 --- a/lib/config-symbian.h +++ b/lib/config-symbian.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -260,8 +260,7 @@ /* Define to 1 if you have the IoctlSocket camel case function. */ /* #undef HAVE_IOCTLSOCKET_CAMEL */ -/* Define to 1 if you have a working IoctlSocket camel case FIONBIO - function. */ +/* Define to 1 if you have a working IoctlSocket camel case FIONBIO function. */ /* #undef HAVE_IOCTLSOCKET_CAMEL_FIONBIO */ /* Define to 1 if you have the header file. */ @@ -481,6 +480,9 @@ /* Define to 1 if you have the `socket' function. */ #define HAVE_SOCKET 1 +/* Define this if you have the SPNEGO library fbopenssl */ +/* #undef HAVE_SPNEGO */ + /* Define to 1 if you have the `SSL_get_shutdown' function. */ /*#define HAVE_SSL_GET_SHUTDOWN 1*/ @@ -657,8 +659,7 @@ /*#define PACKAGE "curl"*/ /* Define to the address where bug reports for this package should be sent. */ -/*#define PACKAGE_BUGREPORT \ - "a suitable curl mailing list => http://curl.haxx.se/mail/"*/ +/*#define PACKAGE_BUGREPORT "a suitable curl mailing list => http://curl.haxx.se/mail/"*/ /* Define to the full name of this package. */ /*#define PACKAGE_NAME "curl"*/ diff --git a/lib/config-tpf.h b/lib/config-tpf.h index 6ff701a..ddb8f77 100644 --- a/lib/config-tpf.h +++ b/lib/config-tpf.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -246,8 +246,7 @@ /* Define to 1 if you have the IoctlSocket camel case function. */ /* #undef HAVE_IOCTLSOCKET_CAMEL */ -/* Define to 1 if you have a working IoctlSocket camel case FIONBIO - function. */ +/* Define to 1 if you have a working IoctlSocket camel case FIONBIO function. */ /* #undef HAVE_IOCTLSOCKET_CAMEL_FIONBIO */ /* Define to 1 if you have the header file. */ @@ -437,6 +436,9 @@ /* Define to 1 if you have the `socket' function. */ #define HAVE_SOCKET 1 +/* Define this if you have the SPNEGO library fbopenssl */ +/* #undef HAVE_SPNEGO */ + /* Define to 1 if you have the header file. */ /* #undef HAVE_SSL_H */ #define HAVE_SSL_H 1 @@ -579,8 +581,7 @@ #define PACKAGE "curl" /* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT \ - "a suitable curl mailing list => http://curl.haxx.se/mail/" +#define PACKAGE_BUGREPORT "a suitable curl mailing list => http://curl.haxx.se/mail/" /* Define to the full name of this package. */ #define PACKAGE_NAME "curl" diff --git a/lib/config-vxworks.h b/lib/config-vxworks.h index 05220b5..c94534a 100644 --- a/lib/config-vxworks.h +++ b/lib/config-vxworks.h @@ -547,6 +547,9 @@ /* Define to 1 if you have the `socket' function. */ #define HAVE_SOCKET 1 +/* Define this if you have the SPNEGO library fbopenssl */ +/* #undef HAVE_SPNEGO */ + /* Define to 1 if you have the `SSL_get_shutdown' function. */ #define HAVE_SSL_GET_SHUTDOWN 1 diff --git a/lib/config-win32.h b/lib/config-win32.h index 744e022..62bbedc 100644 --- a/lib/config-win32.h +++ b/lib/config-win32.h @@ -502,39 +502,26 @@ # endif #endif -/* Define some minimum and default build targets for Visual Studio */ -#if defined(_MSC_VER) - /* Officially, Microsoft's Windows SDK versions 6.X does not support Windows - 2000 as a supported build target. VS2008 default installations provides - an embedded Windows SDK v6.0A along with the claim that Windows 2000 is a - valid build target for VS2008. Popular belief is that binaries built with - VS2008 using Windows SDK versions v6.X and Windows 2000 as a build target - are functional. */ +/* Officially, Microsoft's Windows SDK versions 6.X do not support Windows + 2000 as a supported build target. VS2008 default installations provide + an embedded Windows SDK v6.0A along with the claim that Windows 2000 is + a valid build target for VS2008. Popular belief is that binaries built + with VS2008 using Windows SDK versions 6.X and Windows 2000 as a build + target are functional. */ +#if defined(_MSC_VER) && (_MSC_VER >= 1500) # define VS2008_MIN_TARGET 0x0500 +#endif - /* The minimum build target for VS2012 is Vista unless Update 1 is installed - and the v110_xp toolset is choosen. */ -# if defined(_USING_V110_SDK71_) -# define VS2012_MIN_TARGET 0x0501 -# else -# define VS2012_MIN_TARGET 0x0600 -# endif - - /* VS2008 default build target is Windows Vista. We override default target - to be Windows XP. */ -# define VS2008_DEF_TARGET 0x0501 - - /* VS2012 default build target is Windows Vista unless Update 1 is installed - and the v110_xp toolset is choosen. */ -# if defined(_USING_V110_SDK71_) -# define VS2012_DEF_TARGET 0x0501 -# else -# define VS2012_DEF_TARGET 0x0600 -# endif +/* When no build target is specified VS2008 default build target is Windows + Vista, which leaves out even Winsows XP. If no build target has been given + for VS2008 we will target the minimum Officially supported build target, + which happens to be Windows XP. */ +#if defined(_MSC_VER) && (_MSC_VER >= 1500) +# define VS2008_DEF_TARGET 0x0501 #endif /* VS2008 default target settings and minimum build target check. */ -#if defined(_MSC_VER) && (_MSC_VER >= 1500) && (_MSC_VER <= 1600) +#if defined(_MSC_VER) && (_MSC_VER >= 1500) # ifndef _WIN32_WINNT # define _WIN32_WINNT VS2008_DEF_TARGET # endif @@ -546,24 +533,6 @@ # endif #endif -/* VS2012 default target settings and minimum build target check. */ -#if defined(_MSC_VER) && (_MSC_VER >= 1700) -# ifndef _WIN32_WINNT -# define _WIN32_WINNT VS2012_DEF_TARGET -# endif -# ifndef WINVER -# define WINVER VS2012_DEF_TARGET -# endif -# if (_WIN32_WINNT < VS2012_MIN_TARGET) || (WINVER < VS2012_MIN_TARGET) -# if defined(_USING_V110_SDK71_) -# error VS2012 does not support Windows build targets prior to Windows XP -# else -# error VS2012 does not support Windows build targets prior to Windows \ -Vista -# endif -# endif -#endif - /* When no build target is specified Pelles C 5.00 and later default build target is Windows Vista. We override default target to be Windows 2000. */ #if defined(__POCC__) && (__POCC__ >= 500) @@ -700,11 +669,6 @@ Vista # define CURL_DISABLE_LDAP 1 #endif -/* Define to use the Windows crypto library. */ -#if !defined(USE_SSLEAY) && !defined(USE_NSS) -#define USE_WIN32_CRYPTO -#endif - /* ---------------------------------------------------------------- */ /* ADDITIONAL DEFINITIONS */ /* ---------------------------------------------------------------- */ diff --git a/lib/conncache.c b/lib/conncache.c index fcfb150..290638e 100644 --- a/lib/conncache.c +++ b/lib/conncache.c @@ -131,7 +131,7 @@ CURLcode Curl_conncache_add_conn(struct conncache *connc, conn->host.name); if(!bundle) { result = Curl_bundle_create(data, &new_bundle); - if(result) + if(result != CURLE_OK) return result; if(!conncache_add_bundle(data->state.conn_cache, @@ -143,7 +143,7 @@ CURLcode Curl_conncache_add_conn(struct conncache *connc, } result = Curl_bundle_add_conn(bundle, conn); - if(result) { + if(result != CURLE_OK) { if(new_bundle) conncache_remove_bundle(data->state.conn_cache, new_bundle); return result; @@ -152,10 +152,6 @@ CURLcode Curl_conncache_add_conn(struct conncache *connc, conn->connection_id = connc->next_connection_id++; connc->num_connections++; - 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)); - return CURLE_OK; } @@ -175,9 +171,8 @@ void Curl_conncache_remove_conn(struct conncache *connc, if(connc) { connc->num_connections--; - DEBUGF(infof(conn->data, "The cache now contains %" - CURL_FORMAT_CURL_OFF_TU " members\n", - (curl_off_t) connc->num_connections)); + DEBUGF(infof(conn->data, "The cache now contains %d members\n", + connc->num_connections)); } } } @@ -204,20 +199,22 @@ void Curl_conncache_foreach(struct conncache *connc, he = Curl_hash_next_element(&iter); while(he) { struct connectbundle *bundle; + struct connectdata *conn; bundle = he->ptr; - he = Curl_hash_next_element(&iter); 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; + conn = curr->ptr; curr = curr->next; if(1 == func(conn, param)) return; } + + he = Curl_hash_next_element(&iter); } } @@ -227,6 +224,7 @@ struct connectdata * Curl_conncache_find_first_connection(struct conncache *connc) { struct curl_hash_iterator iter; + struct curl_llist_element *curr; struct curl_hash_element *he; struct connectbundle *bundle; @@ -234,7 +232,6 @@ Curl_conncache_find_first_connection(struct conncache *connc) he = Curl_hash_next_element(&iter); while(he) { - struct curl_llist_element *curr; bundle = he->ptr; curr = bundle->conn_list->head; diff --git a/lib/conncache.h b/lib/conncache.h index d793f24..691f061 100644 --- a/lib/conncache.h +++ b/lib/conncache.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2012 - 2014, Linus Nielsen Feltzing, + * Copyright (C) 2012, 2013, Linus Nielsen Feltzing, * * 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,7 @@ struct conncache { struct curl_hash *hash; size_t num_connections; - long next_connection_id; - struct timeval last_cleanup; + size_t next_connection_id; }; struct conncache *Curl_conncache_init(int size); diff --git a/lib/connect.c b/lib/connect.c index 5a60d14..826ec25 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -94,7 +94,7 @@ static bool verifyconnect(curl_socket_t sockfd, int *error); #define KEEPALIVE_FACTOR(x) #endif -#if defined(HAVE_WINSOCK2_H) && !defined(SIO_KEEPALIVE_VALS) +#if defined(HAVE_WINSOCK_H) && !defined(SIO_KEEPALIVE_VALS) #define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4) struct tcp_keepalive { @@ -238,7 +238,7 @@ long Curl_timeleft(struct SessionHandle *data, } static CURLcode bindlocal(struct connectdata *conn, - curl_socket_t sockfd, int af, unsigned int scope) + curl_socket_t sockfd, int af) { struct SessionHandle *data = conn->data; @@ -257,6 +257,12 @@ static CURLcode bindlocal(struct connectdata *conn, int portnum = data->set.localportrange; const char *dev = data->set.str[STRING_DEVICE]; int error; + char myhost[256] = ""; + int done = 0; /* -1 for error, 1 for address found */ + bool is_interface = FALSE; + bool is_host = FALSE; + static const char *if_prefix = "if!"; + static const char *host_prefix = "host!"; /************************************************************* * Select device to bind socket to @@ -268,13 +274,6 @@ static CURLcode bindlocal(struct connectdata *conn, memset(&sa, 0, sizeof(struct Curl_sockaddr_storage)); if(dev && (strlen(dev)<255) ) { - char myhost[256] = ""; - int done = 0; /* -1 for error, 1 for address found */ - bool is_interface = FALSE; - bool is_host = FALSE; - static const char *if_prefix = "if!"; - static const char *host_prefix = "host!"; - if(strncmp(if_prefix, dev, strlen(if_prefix)) == 0) { dev += strlen(if_prefix); is_interface = TRUE; @@ -286,8 +285,7 @@ static CURLcode bindlocal(struct connectdata *conn, /* interface */ if(!is_host) { - switch(Curl_if2ip(af, scope, conn->scope_id, dev, - myhost, sizeof(myhost))) { + switch(Curl_if2ip(af, conn->scope, dev, myhost, sizeof(myhost))) { case IF2IP_NOT_FOUND: if(is_interface) { /* Do not fall back to treating it as a host name */ @@ -376,7 +374,7 @@ static CURLcode bindlocal(struct connectdata *conn, if(done > 0) { #ifdef ENABLE_IPV6 - /* IPv6 address */ + /* ipv6 address */ if(af == AF_INET6) { #ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID char *scope_ptr = strchr(myhost, '%'); @@ -399,7 +397,7 @@ static CURLcode bindlocal(struct connectdata *conn, } else #endif - /* IPv4 address */ + /* ipv4 address */ if((af == AF_INET) && (Curl_inet_pton(AF_INET, myhost, &si4->sin_addr) > 0)) { si4->sin_family = AF_INET; @@ -542,7 +540,7 @@ static CURLcode trynextip(struct connectdata *conn, int sockindex, int tempindex) { - CURLcode result = CURLE_COULDNT_CONNECT; + CURLcode rc = CURLE_COULDNT_CONNECT; /* First clean up after the failed socket. Don't close it yet to ensure that the next IP's socket gets a different @@ -576,12 +574,11 @@ static CURLcode trynextip(struct connectdata *conn, ai = ai->ai_next; if(ai) { - result = singleipconnect(conn, ai, &conn->tempsock[tempindex]); - if(result == CURLE_COULDNT_CONNECT) { + rc = singleipconnect(conn, ai, &conn->tempsock[tempindex]); + if(rc == CURLE_COULDNT_CONNECT) { ai = ai->ai_next; continue; } - conn->tempaddr[tempindex] = ai; } break; @@ -591,7 +588,7 @@ static CURLcode trynextip(struct connectdata *conn, if(fd_to_close != CURL_SOCKET_BAD) Curl_closesocket(conn, fd_to_close); - return result; + return rc; } /* Copies connection info into the session handle to make it available @@ -659,6 +656,7 @@ static bool getaddressinfo(struct sockaddr* sa, char* addr, connection */ void Curl_updateconninfo(struct connectdata *conn, curl_socket_t sockfd) { + int error; curl_socklen_t len; struct Curl_sockaddr_storage ssrem; struct Curl_sockaddr_storage ssloc; @@ -669,7 +667,6 @@ void Curl_updateconninfo(struct connectdata *conn, curl_socket_t sockfd) return; if(!conn->bits.reuse) { - int error; len = sizeof(struct Curl_sockaddr_storage); if(getpeername(sockfd, (struct sockaddr*) &ssrem, &len)) { @@ -680,7 +677,6 @@ 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; failf(data, "getsockname() failed with errno %d: %s", @@ -720,11 +716,11 @@ CURLcode Curl_is_connected(struct connectdata *conn, bool *connected) { struct SessionHandle *data = conn->data; - CURLcode result = CURLE_OK; + CURLcode code = CURLE_OK; long allow; int error = 0; struct timeval now; - int rc; + int result; int i; DEBUGASSERT(sockindex >= FIRSTSOCKET && sockindex <= SECONDARYSOCKET); @@ -760,9 +756,9 @@ CURLcode Curl_is_connected(struct connectdata *conn, #endif /* check socket for connect */ - rc = Curl_socket_ready(CURL_SOCKET_BAD, conn->tempsock[i], 0); + result = Curl_socket_ready(CURL_SOCKET_BAD, conn->tempsock[i], 0); - if(rc == 0) { /* no connection yet */ + if(result == 0) { /* no connection yet */ if(curlx_tvdiff(now, conn->connecttime) >= conn->timeoutms_per_addr) { infof(data, "After %ldms connect time, move on!\n", conn->timeoutms_per_addr); @@ -775,7 +771,7 @@ CURLcode Curl_is_connected(struct connectdata *conn, trynextip(conn, sockindex, 1); } } - else if(rc == CURL_CSELECT_OUT) { + else if(result == CURL_CSELECT_OUT) { if(verifyconnect(conn->tempsock[i], &error)) { /* we are connected with TCP, awesome! */ int other = i ^ 1; @@ -792,9 +788,9 @@ CURLcode Curl_is_connected(struct connectdata *conn, } /* see if we need to do any proxy magic first once we connected */ - result = Curl_connected_proxy(conn, sockindex); - if(result) - return result; + code = Curl_connected_proxy(conn, sockindex); + if(code) + return code; conn->bits.tcpconnect[sockindex] = TRUE; @@ -809,7 +805,7 @@ CURLcode Curl_is_connected(struct connectdata *conn, else infof(data, "Connection failed\n"); } - else if(rc & CURL_CSELECT_ERR) + else if(result & CURL_CSELECT_ERR) (void)verifyconnect(conn->tempsock[i], &error); /* @@ -817,10 +813,10 @@ CURLcode Curl_is_connected(struct connectdata *conn, * address" for the given host. But first remember the latest error. */ if(error) { + char ipaddress[MAX_IPADR_LEN]; data->state.os_errno = error; SET_SOCKERRNO(error); if(conn->tempaddr[i]) { - char ipaddress[MAX_IPADR_LEN]; Curl_printable_address(conn->tempaddr[i], ipaddress, MAX_IPADR_LEN); infof(data, "connect to %s port %ld failed: %s\n", ipaddress, conn->port, Curl_strerror(conn, error)); @@ -828,20 +824,21 @@ CURLcode Curl_is_connected(struct connectdata *conn, conn->timeoutms_per_addr = conn->tempaddr[i]->ai_next == NULL ? allow : allow / 2; - result = trynextip(conn, sockindex, i); + code = trynextip(conn, sockindex, i); } } } - if(result) { + if(code) { /* no more addresses to try */ /* if the first address family runs out of addresses to try before the happy eyeball timeout, go ahead and try the next family now */ if(conn->tempaddr[1] == NULL) { - result = trynextip(conn, sockindex, 1); - if(!result) - return result; + int rc; + rc = trynextip(conn, sockindex, 1); + if(rc == CURLE_OK) + return CURLE_OK; } failf(data, "Failed to connect to %s port %ld: %s", @@ -849,7 +846,7 @@ CURLcode Curl_is_connected(struct connectdata *conn, conn->port, Curl_strerror(conn, error)); } - return result; + return code; } static void tcpnodelay(struct connectdata *conn, @@ -980,9 +977,10 @@ void Curl_sndbufset(curl_socket_t sockfd) * singleipconnect() connects to the given IP only, and it may return without * having connected. */ -static CURLcode singleipconnect(struct connectdata *conn, - const Curl_addrinfo *ai, - curl_socket_t *sockp) +static CURLcode +singleipconnect(struct connectdata *conn, + const Curl_addrinfo *ai, + curl_socket_t *sockp) { struct Curl_sockaddr_ex addr; int rc; @@ -990,15 +988,14 @@ static CURLcode singleipconnect(struct connectdata *conn, bool isconnected = FALSE; struct SessionHandle *data = conn->data; curl_socket_t sockfd; - CURLcode result; + CURLcode res = CURLE_OK; char ipaddress[MAX_IPADR_LEN]; long port; - bool is_tcp; *sockp = CURL_SOCKET_BAD; - result = Curl_socket(conn, ai, &addr, &sockfd); - if(result) + res = Curl_socket(conn, ai, &addr, &sockfd); + if(res) /* Failed to create the socket, but still return OK since we signal the lack of socket as well. This allows the parent function to keep looping over alternative addresses/socket families etc. */ @@ -1016,16 +1013,14 @@ static CURLcode singleipconnect(struct connectdata *conn, } infof(data, " Trying %s...\n", ipaddress); - is_tcp = (addr.family == AF_INET || addr.family == AF_INET6) && - addr.socktype == SOCK_STREAM; - if(is_tcp && data->set.tcp_nodelay) + if(data->set.tcp_nodelay) tcpnodelay(conn, sockfd); nosigpipe(conn, sockfd); Curl_sndbufset(sockfd); - if(is_tcp && data->set.tcp_keepalive) + if(data->set.tcp_keepalive) tcpkeepalive(data, sockfd); if(data->set.fsockopt) { @@ -1043,26 +1038,23 @@ static CURLcode singleipconnect(struct connectdata *conn, } /* possibly bind the local end to an IP, interface or port */ - if(addr.family == AF_INET || addr.family == AF_INET6) { - result = bindlocal(conn, sockfd, addr.family, - Curl_ipv6_scope((struct sockaddr*)&addr.sa_addr)); - if(result) { - Curl_closesocket(conn, sockfd); /* close socket and bail out */ - if(result == CURLE_UNSUPPORTED_PROTOCOL) { - /* The address family is not supported on this interface. - We can continue trying addresses */ - return CURLE_COULDNT_CONNECT; - } - return result; + res = bindlocal(conn, sockfd, addr.family); + if(res) { + Curl_closesocket(conn, sockfd); /* close socket and bail out */ + if(res == CURLE_UNSUPPORTED_PROTOCOL) { + /* The address family is not supported on this interface. + We can continue trying addresses */ + return CURLE_OK; } + return res; } /* set socket non-blocking */ - (void)curlx_nonblock(sockfd, TRUE); + curlx_nonblock(sockfd, TRUE); conn->connecttime = Curl_tvnow(); if(conn->num_addr > 1) - Curl_expire_latest(data, conn->timeoutms_per_addr); + Curl_expire(data, conn->timeoutms_per_addr); /* Connect TCP sockets, bind UDP */ if(!isconnected && (conn->socktype == SOCK_STREAM)) { @@ -1092,7 +1084,7 @@ static CURLcode singleipconnect(struct connectdata *conn, case EAGAIN: #endif #endif - result = CURLE_OK; + res = CURLE_OK; break; default: @@ -1103,14 +1095,14 @@ static CURLcode singleipconnect(struct connectdata *conn, /* connect failed */ Curl_closesocket(conn, sockfd); - result = CURLE_COULDNT_CONNECT; + res = CURLE_COULDNT_CONNECT; } } - if(!result) + if(!res) *sockp = sockfd; - return result; + return res; } /* @@ -1124,7 +1116,7 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */ { struct SessionHandle *data = conn->data; struct timeval before = Curl_tvnow(); - CURLcode result = CURLE_COULDNT_CONNECT; + CURLcode res = CURLE_COULDNT_CONNECT; long timeout_ms = Curl_timeleft(data, &before, TRUE); @@ -1147,14 +1139,14 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */ /* start connecting to first IP */ while(conn->tempaddr[0]) { - result = singleipconnect(conn, conn->tempaddr[0], &(conn->tempsock[0])); - if(!result) - break; + res = singleipconnect(conn, conn->tempaddr[0], &(conn->tempsock[0])); + if(res == CURLE_OK) + break; conn->tempaddr[0] = conn->tempaddr[0]->ai_next; } if(conn->tempsock[0] == CURL_SOCKET_BAD) - return result; + return res; data->info.numconnects++; /* to track the number of connections made */ @@ -1251,13 +1243,12 @@ int Curl_closesocket(struct connectdata *conn, else return conn->fclosesocket(conn->closesocket_client, sock); } + sclose(sock); if(conn) /* tell the multi-socket code about this */ Curl_multi_closed(conn, sock); - sclose(sock); - return 0; } @@ -1321,9 +1312,9 @@ CURLcode Curl_socket(struct connectdata *conn, return CURLE_COULDNT_CONNECT; #if defined(ENABLE_IPV6) && defined(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID) - if(conn->scope_id && (addr->family == AF_INET6)) { + if(conn->scope && (addr->family == AF_INET6)) { struct sockaddr_in6 * const sa6 = (void *)&addr->sa_addr; - sa6->sin6_scope_id = conn->scope_id; + sa6->sin6_scope_id = conn->scope; } #endif @@ -1334,20 +1325,15 @@ CURLcode Curl_socket(struct connectdata *conn, #ifdef CURLDEBUG /* * Curl_conncontrol() is used to set the conn->bits.close bit on or off. It - * MUST be called with the connclose() or connkeep() macros with a stated + * MUST be called with the connclose() or connclose() macros with a stated * reason. The reason is only shown in debug builds but helps to figure out * decision paths when connections are or aren't re-used as expected. */ void Curl_conncontrol(struct connectdata *conn, bool closeit, const char *reason) { -#if defined(CURL_DISABLE_VERBOSE_STRINGS) - (void) reason; -#endif - infof(conn->data, "Marked for [%s]: %s\n", closeit?"closure":"keep alive", reason); - conn->bits.close = closeit; /* the only place in the source code that should assign this bit */ } diff --git a/lib/connect.h b/lib/connect.h index 91646c7..7bc391b 100644 --- a/lib/connect.h +++ b/lib/connect.h @@ -41,7 +41,7 @@ long Curl_timeleft(struct SessionHandle *data, #define DEFAULT_CONNECT_TIMEOUT 300000 /* milliseconds == five minutes */ #define HAPPY_EYEBALLS_TIMEOUT 200 /* milliseconds to wait between - IPv4/IPv6 connection attempts */ + ipv4/ipv6 connection attempts */ /* * Used to extract socket and connectdata struct for the most recent diff --git a/lib/cookie.c b/lib/cookie.c index fbd2fe7..0590643 100644 --- a/lib/cookie.c +++ b/lib/cookie.c @@ -26,17 +26,14 @@ RECEIVING COOKIE INFORMATION ============================ -struct CookieInfo *Curl_cookie_init(struct SessionHandle *data, - const char *file, struct CookieInfo *inc, bool newsession); +struct CookieInfo *cookie_init(char *file); Inits a cookie struct to store data in a local file. This is always called before any cookies are set. -struct Cookie *Curl_cookie_add(struct SessionHandle *data, - struct CookieInfo *c, bool httpheader, char *lineptr, - const char *domain, const char *path); +int cookies_set(struct CookieInfo *cookie, char *cookie_line); - The 'lineptr' parameter is a full "Set-cookie:" line as + The 'cookie_line' parameter is a full "Set-cookie:" line as received from a server. The function need to replace previously stored lines that this new @@ -50,8 +47,8 @@ struct Cookie *Curl_cookie_add(struct SessionHandle *data, SENDING COOKIE INFORMATION ========================== -struct Cookies *Curl_cookie_getlist(struct CookieInfo *cookie, - char *host, char *path, bool secure); +struct Cookies *cookie_getlist(struct CookieInfo *cookie, + char *host, char *path, bool secure); For a given host and path, return a linked list of cookies that the client should send to the server if used now. The secure @@ -98,7 +95,6 @@ Example set of cookies: #include "strtoofft.h" #include "rawstr.h" #include "curl_memrchr.h" -#include "inet_pton.h" /* The last #include file should be: */ #include "memdebug.h" @@ -236,14 +232,11 @@ static char *sanitize_cookie_path(const char *cookie_path) return NULL; /* some stupid site sends path attribute with '"'. */ - len = strlen(new_path); if(new_path[0] == '\"') { - memmove((void *)new_path, (const void *)(new_path + 1), len); - len--; + memmove((void *)new_path, (const void *)(new_path + 1), strlen(new_path)); } - if(len && (new_path[len - 1] == '\"')) { - new_path[len - 1] = 0x0; - len--; + if(new_path[strlen(new_path) - 1] == '\"') { + new_path[strlen(new_path) - 1] = 0x0; } /* RFC6265 5.2.4 The Path Attribute */ @@ -255,7 +248,8 @@ static char *sanitize_cookie_path(const char *cookie_path) } /* convert /hoge/ to /hoge */ - if(len && new_path[len - 1] == '/') { + len = strlen(new_path); + if(1 < len && new_path[len - 1] == '/') { new_path[len - 1] = 0x0; } @@ -264,8 +258,6 @@ static char *sanitize_cookie_path(const char *cookie_path) /* * Load cookies from all given cookie files (CURLOPT_COOKIEFILE). - * - * NOTE: OOM or cookie parsing failures are ignored. */ void Curl_cookie_loadfiles(struct SessionHandle *data) { @@ -273,17 +265,10 @@ void Curl_cookie_loadfiles(struct SessionHandle *data) if(list) { Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE); while(list) { - struct CookieInfo *newcookies = Curl_cookie_init(data, - list->data, - data->cookies, - data->set.cookiesession); - if(!newcookies) - /* Failure may be due to OOM or a bad cookie; both are ignored - * but only the first should be - */ - infof(data, "ignoring failed cookie_init for %s\n", list->data); - else - data->cookies = newcookies; + data->cookies = Curl_cookie_init(data, + list->data, + data->cookies, + data->set.cookiesession); list = list->next; } curl_slist_free_all(data->change.cookielist); /* clean up list */ @@ -334,28 +319,6 @@ static void remove_expired(struct CookieInfo *cookies) } } -/* - * Return true if the given string is an IP(v4|v6) address. - */ -static bool isip(const char *domain) -{ - struct in_addr addr; -#ifdef ENABLE_IPV6 - struct in6_addr addr6; -#endif - - if(Curl_inet_pton(AF_INET, domain, &addr) -#ifdef ENABLE_IPV6 - || Curl_inet_pton(AF_INET6, domain, &addr6) -#endif - ) { - /* domain name given as IP address */ - return TRUE; - } - - return FALSE; -} - /**************************************************************************** * * Curl_cookie_add() @@ -365,8 +328,6 @@ static bool isip(const char *domain) * Be aware that sometimes we get an IP-only host name, and that might also be * a numerical IPv6 address. * - * Returns NULL on out of memory or invalid cookie. This is suboptimal, - * as they should be treated separately. ***************************************************************************/ struct Cookie * @@ -478,33 +439,24 @@ Curl_cookie_add(struct SessionHandle *data, } } else if(Curl_raw_equal("domain", name)) { - bool is_ip; - const char *dotp; - /* Now, we make sure that our host is within the given domain, or the given domain is not valid and thus cannot be set. */ if('.' == whatptr[0]) whatptr++; /* ignore preceding dot */ - is_ip = isip(domain ? domain : whatptr); - - /* check for more dots */ - dotp = strchr(whatptr, '.'); - if(!dotp) - domain=":"; - - if(!domain - || (is_ip && !strcmp(whatptr, domain)) - || (!is_ip && tailmatch(whatptr, domain))) { - strstore(&co->domain, whatptr); + if(!domain || tailmatch(whatptr, domain)) { + const char *tailptr=whatptr; + if(tailptr[0] == '.') + tailptr++; + strstore(&co->domain, tailptr); /* don't prefix w/dots + internally */ if(!co->domain) { badcookie = TRUE; 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 @@ -898,7 +850,6 @@ Curl_cookie_add(struct SessionHandle *data, * * If 'newsession' is TRUE, discard all "session cookies" on read from file. * - * Returns NULL on out of memory. Invalid cookies are ignored. ****************************************************************************/ struct CookieInfo *Curl_cookie_init(struct SessionHandle *data, const char *file, @@ -906,9 +857,8 @@ struct CookieInfo *Curl_cookie_init(struct SessionHandle *data, bool newsession) { struct CookieInfo *c; - FILE *fp = NULL; + FILE *fp; bool fromfile=TRUE; - char *line = NULL; if(NULL == inc) { /* we didn't get a struct, create one */ @@ -916,8 +866,6 @@ struct CookieInfo *Curl_cookie_init(struct SessionHandle *data, if(!c) return NULL; /* failed to get memory */ c->filename = strdup(file?file:"none"); /* copy the name just in case */ - if(!c->filename) - goto fail; /* failed to get memory */ } else { /* we got an already existing one, use that */ @@ -942,26 +890,25 @@ struct CookieInfo *Curl_cookie_init(struct SessionHandle *data, char *lineptr; bool headerline; - line = malloc(MAX_COOKIE_LINE); - if(!line) - goto fail; - while(fgets(line, MAX_COOKIE_LINE, fp)) { - if(checkprefix("Set-Cookie:", line)) { - /* This is a cookie line, get it! */ - lineptr=&line[11]; - headerline=TRUE; - } - else { - lineptr=line; - headerline=FALSE; - } - while(*lineptr && ISBLANK(*lineptr)) - lineptr++; + char *line = malloc(MAX_COOKIE_LINE); + if(line) { + while(fgets(line, MAX_COOKIE_LINE, fp)) { + if(checkprefix("Set-Cookie:", line)) { + /* This is a cookie line, get it! */ + lineptr=&line[11]; + headerline=TRUE; + } + else { + lineptr=line; + headerline=FALSE; + } + while(*lineptr && ISBLANK(*lineptr)) + lineptr++; - Curl_cookie_add(data, c, headerline, lineptr, NULL, NULL); + Curl_cookie_add(data, c, headerline, lineptr, NULL, NULL); + } + free(line); /* free the line buffer */ } - free(line); /* free the line buffer */ - if(fromfile) fclose(fp); } @@ -969,16 +916,6 @@ struct CookieInfo *Curl_cookie_init(struct SessionHandle *data, c->running = TRUE; /* now, we're running */ return c; - -fail: - Curl_safefree(line); - if(!inc) - /* Only clean up if we allocated it here, as the original could still be in - * use by a share handle */ - Curl_cookie_cleanup(c); - if(fromfile && fp) - fclose(fp); - return NULL; /* out of memory */ } /* sort this so that the longest path gets before the shorter path */ @@ -1031,7 +968,6 @@ struct Cookie *Curl_cookie_getlist(struct CookieInfo *c, time_t now = time(NULL); struct Cookie *mainco=NULL; size_t matches = 0; - bool is_ip; if(!c || !c->cookies) return NULL; /* no cookie struct or no cookies in the struct */ @@ -1039,9 +975,6 @@ struct Cookie *Curl_cookie_getlist(struct CookieInfo *c, /* at first, remove expired cookies */ remove_expired(c); - /* check if host is an IP(v4|v6) address */ - is_ip = isip(host); - co = c->cookies; while(co) { @@ -1053,8 +986,8 @@ struct Cookie *Curl_cookie_getlist(struct CookieInfo *c, /* now check if the domain is correct */ if(!co->domain || - (co->tailmatch && !is_ip && tailmatch(co->domain, host)) || - ((!co->tailmatch || is_ip) && Curl_raw_equal(host, co->domain)) ) { + (co->tailmatch && tailmatch(co->domain, host)) || + (!co->tailmatch && Curl_raw_equal(host, co->domain)) ) { /* the right part of the host matches the domain stuff in the cookie data */ @@ -1158,14 +1091,16 @@ void Curl_cookie_clearall(struct CookieInfo *cookies) void Curl_cookie_freelist(struct Cookie *co, bool cookiestoo) { struct Cookie *next; - while(co) { - next = co->next; - if(cookiestoo) - freecookie(co); - else - free(co); /* we only free the struct since the "members" are all just - pointed out in the main cookie list! */ - co = next; + if(co) { + while(co) { + next = co->next; + if(cookiestoo) + freecookie(co); + else + free(co); /* we only free the struct since the "members" are all just + pointed out in the main cookie list! */ + co = next; + } } } @@ -1212,15 +1147,23 @@ void Curl_cookie_clearsess(struct CookieInfo *cookies) * * Curl_cookie_cleanup() * - * Free a "cookie object" previous created with Curl_cookie_init(). + * Free a "cookie object" previous created with cookie_init(). * ****************************************************************************/ void Curl_cookie_cleanup(struct CookieInfo *c) { + struct Cookie *co; + struct Cookie *next; if(c) { if(c->filename) free(c->filename); - Curl_cookie_freelist(c->cookies, TRUE); + co = c->cookies; + + while(co) { + next = co->next; + freecookie(co); + co = next; + } free(c); /* free the base struct as well */ } } diff --git a/lib/curl_addrinfo.c b/lib/curl_addrinfo.c index 1e359d5..10652c6 100644 --- a/lib/curl_addrinfo.c +++ b/lib/curl_addrinfo.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * 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 @@ -33,9 +33,6 @@ #ifdef HAVE_ARPA_INET_H # include #endif -#ifdef HAVE_SYS_UN_H -# include -#endif #ifdef __VMS # include @@ -357,7 +354,7 @@ Curl_he2ai(const struct hostent *he, int port) prevai = ai; } - if(result) { + if(result != CURLE_OK) { Curl_freeaddrinfo(firstai); firstai = NULL; } @@ -480,42 +477,6 @@ Curl_addrinfo *Curl_str2addr(char *address, int port) return NULL; /* bad input format */ } -#ifdef USE_UNIX_SOCKETS -/** - * Given a path to a Unix domain socket, return a newly allocated Curl_addrinfo - * struct initialized with this path. - */ -Curl_addrinfo *Curl_unix2addr(const char *path) -{ - Curl_addrinfo *ai; - struct sockaddr_un *sa_un; - size_t path_len; - - ai = calloc(1, sizeof(Curl_addrinfo)); - if(!ai) - return NULL; - if((ai->ai_addr = calloc(1, sizeof(struct sockaddr_un))) == NULL) { - free(ai); - return NULL; - } - /* sun_path must be able to store the NUL-terminated path */ - path_len = strlen(path); - if(path_len >= sizeof(sa_un->sun_path)) { - free(ai->ai_addr); - free(ai); - return NULL; - } - - ai->ai_family = AF_UNIX; - ai->ai_socktype = SOCK_STREAM; /* assume reliable transport for HTTP */ - ai->ai_addrlen = (curl_socklen_t) sizeof(struct sockaddr_un); - sa_un = (void *) ai->ai_addr; - sa_un->sun_family = AF_UNIX; - memcpy(sa_un->sun_path, path, path_len + 1); /* copy NUL byte */ - return ai; -} -#endif - #if defined(CURLDEBUG) && defined(HAVE_FREEADDRINFO) /* * curl_dofreeaddrinfo() diff --git a/lib/curl_addrinfo.h b/lib/curl_addrinfo.h index 4ef8827..6d2b753 100644 --- a/lib/curl_addrinfo.h +++ b/lib/curl_addrinfo.h @@ -79,10 +79,6 @@ Curl_ip2addr(int af, const void *inaddr, const char *hostname, int port); Curl_addrinfo *Curl_str2addr(char *dotted, int port); -#ifdef USE_UNIX_SOCKETS -Curl_addrinfo *Curl_unix2addr(const char *path); -#endif - #if defined(CURLDEBUG) && defined(HAVE_FREEADDRINFO) void curl_dofreeaddrinfo(struct addrinfo *freethis, diff --git a/lib/curl_base64.h b/lib/curl_base64.h index 92896fe..6e200d2 100644 --- a/lib/curl_base64.h +++ b/lib/curl_base64.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2011, Daniel Stenberg, , 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,9 +25,6 @@ CURLcode Curl_base64_encode(struct SessionHandle *data, const char *inputbuff, size_t insize, char **outptr, size_t *outlen); -CURLcode Curl_base64url_encode(struct SessionHandle *data, - const char *inputbuff, size_t insize, - char **outptr, size_t *outlen); CURLcode Curl_base64_decode(const char *src, unsigned char **outptr, size_t *outlen); diff --git a/lib/curl_config.h.cmake b/lib/curl_config.h.cmake index 87be9c7..454c9e6 100644 --- a/lib/curl_config.h.cmake +++ b/lib/curl_config.h.cmake @@ -1,7 +1,7 @@ /* lib/curl_config.h.in. Generated somehow by cmake. */ /* when building libcurl itself */ -#cmakedefine BUILDING_LIBCURL 1 +#cmakedefine BUILDING_LIBCURL ${BUILDING_LIBCURL} /* Location of default ca bundle */ #cmakedefine CURL_CA_BUNDLE ${CURL_CA_BUNDLE} @@ -10,62 +10,62 @@ #cmakedefine CURL_CA_PATH ${CURL_CA_PATH} /* to disable cookies support */ -#cmakedefine CURL_DISABLE_COOKIES 1 +#cmakedefine CURL_DISABLE_COOKIES ${CURL_DISABLE_COOKIES} /* to disable cryptographic authentication */ -#cmakedefine CURL_DISABLE_CRYPTO_AUTH 1 +#cmakedefine CURL_DISABLE_CRYPTO_AUTH ${CURL_DISABLE_CRYPTO_AUTH} /* to disable DICT */ -#cmakedefine CURL_DISABLE_DICT 1 +#cmakedefine CURL_DISABLE_DICT ${CURL_DISABLE_DICT} /* to disable FILE */ -#cmakedefine CURL_DISABLE_FILE 1 +#cmakedefine CURL_DISABLE_FILE ${CURL_DISABLE_FILE} /* to disable FTP */ -#cmakedefine CURL_DISABLE_FTP 1 +#cmakedefine CURL_DISABLE_FTP ${CURL_DISABLE_FTP} /* to disable HTTP */ -#cmakedefine CURL_DISABLE_HTTP 1 +#cmakedefine CURL_DISABLE_HTTP ${CURL_DISABLE_HTTP} /* to disable LDAP */ -#cmakedefine CURL_DISABLE_LDAP 1 +#cmakedefine CURL_DISABLE_LDAP ${CURL_DISABLE_LDAP} /* to disable LDAPS */ -#cmakedefine CURL_DISABLE_LDAPS 1 +#cmakedefine CURL_DISABLE_LDAPS ${CURL_DISABLE_LDAPS} /* to disable proxies */ -#cmakedefine CURL_DISABLE_PROXY 1 +#cmakedefine CURL_DISABLE_PROXY ${CURL_DISABLE_PROXY} /* to disable TELNET */ -#cmakedefine CURL_DISABLE_TELNET 1 +#cmakedefine CURL_DISABLE_TELNET ${CURL_DISABLE_TELNET} /* to disable TFTP */ -#cmakedefine CURL_DISABLE_TFTP 1 +#cmakedefine CURL_DISABLE_TFTP ${CURL_DISABLE_TFTP} /* to disable verbose strings */ -#cmakedefine CURL_DISABLE_VERBOSE_STRINGS 1 +#cmakedefine CURL_DISABLE_VERBOSE_STRINGS ${CURL_DISABLE_VERBOSE_STRINGS} /* to make a symbol visible */ -#cmakedefine CURL_EXTERN_SYMBOL 1 +#cmakedefine CURL_EXTERN_SYMBOL ${CURL_EXTERN_SYMBOL} /* Ensure using CURL_EXTERN_SYMBOL is possible */ #ifndef CURL_EXTERN_SYMBOL #define CURL_EXTERN_SYMBOL #endif /* Use Windows LDAP implementation */ -#cmakedefine CURL_LDAP_WIN 1 +#cmakedefine CURL_LDAP_WIN ${CURL_LDAP_WIN} /* when not building a shared library */ -#cmakedefine CURL_STATICLIB 1 +#cmakedefine CURL_STATICLIB ${CURL_STATICLIB} /* Set to explicitly specify we don't want to use thread-safe functions */ -#cmakedefine DISABLED_THREADSAFE 1 +#cmakedefine DISABLED_THREADSAFE ${DISABLED_THREADSAFE} /* your Entropy Gathering Daemon socket pathname */ #cmakedefine EGD_SOCKET ${EGD_SOCKET} /* Define if you want to enable IPv6 support */ -#cmakedefine ENABLE_IPV6 1 +#cmakedefine ENABLE_IPV6 ${ENABLE_IPV6} /* Define to the type qualifier of arg 1 for getnameinfo. */ #cmakedefine GETNAMEINFO_QUAL_ARG1 ${GETNAMEINFO_QUAL_ARG1} @@ -89,660 +89,646 @@ #cmakedefine GETSERVBYPORT_R_BUFSIZE ${GETSERVBYPORT_R_BUFSIZE} /* Define to 1 if you have the alarm function. */ -#cmakedefine HAVE_ALARM 1 +#cmakedefine HAVE_ALARM ${HAVE_ALARM} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_ALLOCA_H 1 +#cmakedefine HAVE_ALLOCA_H ${HAVE_ALLOCA_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_ARPA_INET_H 1 +#cmakedefine HAVE_ARPA_INET_H ${HAVE_ARPA_INET_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_ARPA_TFTP_H 1 +#cmakedefine HAVE_ARPA_TFTP_H ${HAVE_ARPA_TFTP_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_ASSERT_H 1 +#cmakedefine HAVE_ASSERT_H ${HAVE_ASSERT_H} /* Define to 1 if you have the `basename' function. */ -#cmakedefine HAVE_BASENAME 1 +#cmakedefine HAVE_BASENAME ${HAVE_BASENAME} /* Define to 1 if bool is an available type. */ -#cmakedefine HAVE_BOOL_T 1 +#cmakedefine HAVE_BOOL_T ${HAVE_BOOL_T} /* Define to 1 if you have the clock_gettime function and monotonic timer. */ -#cmakedefine HAVE_CLOCK_GETTIME_MONOTONIC 1 +#cmakedefine HAVE_CLOCK_GETTIME_MONOTONIC ${HAVE_CLOCK_GETTIME_MONOTONIC} /* Define to 1 if you have the `closesocket' function. */ -#cmakedefine HAVE_CLOSESOCKET 1 +#cmakedefine HAVE_CLOSESOCKET ${HAVE_CLOSESOCKET} /* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */ -#cmakedefine HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1 +#cmakedefine HAVE_CRYPTO_CLEANUP_ALL_EX_DATA ${HAVE_CRYPTO_CLEANUP_ALL_EX_DATA} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_CRYPTO_H 1 +#cmakedefine HAVE_CRYPTO_H ${HAVE_CRYPTO_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_DES_H 1 +#cmakedefine HAVE_DES_H ${HAVE_DES_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_DLFCN_H 1 +#cmakedefine HAVE_DLFCN_H ${HAVE_DLFCN_H} /* Define to 1 if you have the `ENGINE_load_builtin_engines' function. */ -#cmakedefine HAVE_ENGINE_LOAD_BUILTIN_ENGINES 1 +#cmakedefine HAVE_ENGINE_LOAD_BUILTIN_ENGINES ${HAVE_ENGINE_LOAD_BUILTIN_ENGINES} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_ERRNO_H 1 +#cmakedefine HAVE_ERRNO_H ${HAVE_ERRNO_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_ERR_H 1 +#cmakedefine HAVE_ERR_H ${HAVE_ERR_H} /* Define to 1 if you have the fcntl function. */ -#cmakedefine HAVE_FCNTL 1 +#cmakedefine HAVE_FCNTL ${HAVE_FCNTL} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_FCNTL_H 1 +#cmakedefine HAVE_FCNTL_H ${HAVE_FCNTL_H} /* Define to 1 if you have a working fcntl O_NONBLOCK function. */ -#cmakedefine HAVE_FCNTL_O_NONBLOCK 1 +#cmakedefine HAVE_FCNTL_O_NONBLOCK ${HAVE_FCNTL_O_NONBLOCK} /* Define to 1 if you have the fdopen function. */ -#cmakedefine HAVE_FDOPEN 1 +#cmakedefine HAVE_FDOPEN ${HAVE_FDOPEN} /* Define to 1 if you have the `fork' function. */ -#cmakedefine HAVE_FORK 1 +#cmakedefine HAVE_FORK ${HAVE_FORK} /* Define to 1 if you have the freeaddrinfo function. */ -#cmakedefine HAVE_FREEADDRINFO 1 +#cmakedefine HAVE_FREEADDRINFO ${HAVE_FREEADDRINFO} /* Define to 1 if you have the freeifaddrs function. */ -#cmakedefine HAVE_FREEIFADDRS 1 +#cmakedefine HAVE_FREEIFADDRS ${HAVE_FREEIFADDRS} /* Define to 1 if you have the ftruncate function. */ -#cmakedefine HAVE_FTRUNCATE 1 +#cmakedefine HAVE_FTRUNCATE ${HAVE_FTRUNCATE} /* Define to 1 if you have a working getaddrinfo function. */ -#cmakedefine HAVE_GETADDRINFO 1 +#cmakedefine HAVE_GETADDRINFO ${HAVE_GETADDRINFO} /* Define to 1 if you have the `geteuid' function. */ -#cmakedefine HAVE_GETEUID 1 +#cmakedefine HAVE_GETEUID ${HAVE_GETEUID} /* Define to 1 if you have the gethostbyaddr function. */ -#cmakedefine HAVE_GETHOSTBYADDR 1 +#cmakedefine HAVE_GETHOSTBYADDR ${HAVE_GETHOSTBYADDR} /* Define to 1 if you have the gethostbyaddr_r function. */ -#cmakedefine HAVE_GETHOSTBYADDR_R 1 +#cmakedefine HAVE_GETHOSTBYADDR_R ${HAVE_GETHOSTBYADDR_R} /* gethostbyaddr_r() takes 5 args */ -#cmakedefine HAVE_GETHOSTBYADDR_R_5 1 +#cmakedefine HAVE_GETHOSTBYADDR_R_5 ${HAVE_GETHOSTBYADDR_R_5} /* gethostbyaddr_r() takes 7 args */ -#cmakedefine HAVE_GETHOSTBYADDR_R_7 1 +#cmakedefine HAVE_GETHOSTBYADDR_R_7 ${HAVE_GETHOSTBYADDR_R_7} /* gethostbyaddr_r() takes 8 args */ -#cmakedefine HAVE_GETHOSTBYADDR_R_8 1 +#cmakedefine HAVE_GETHOSTBYADDR_R_8 ${HAVE_GETHOSTBYADDR_R_8} /* Define to 1 if you have the gethostbyname function. */ -#cmakedefine HAVE_GETHOSTBYNAME 1 +#cmakedefine HAVE_GETHOSTBYNAME ${HAVE_GETHOSTBYNAME} /* Define to 1 if you have the gethostbyname_r function. */ -#cmakedefine HAVE_GETHOSTBYNAME_R 1 +#cmakedefine HAVE_GETHOSTBYNAME_R ${HAVE_GETHOSTBYNAME_R} /* gethostbyname_r() takes 3 args */ -#cmakedefine HAVE_GETHOSTBYNAME_R_3 1 +#cmakedefine HAVE_GETHOSTBYNAME_R_3 ${HAVE_GETHOSTBYNAME_R_3} /* gethostbyname_r() takes 5 args */ -#cmakedefine HAVE_GETHOSTBYNAME_R_5 1 +#cmakedefine HAVE_GETHOSTBYNAME_R_5 ${HAVE_GETHOSTBYNAME_R_5} /* gethostbyname_r() takes 6 args */ -#cmakedefine HAVE_GETHOSTBYNAME_R_6 1 +#cmakedefine HAVE_GETHOSTBYNAME_R_6 ${HAVE_GETHOSTBYNAME_R_6} /* Define to 1 if you have the gethostname function. */ -#cmakedefine HAVE_GETHOSTNAME 1 +#cmakedefine HAVE_GETHOSTNAME ${HAVE_GETHOSTNAME} /* Define to 1 if you have a working getifaddrs function. */ -#cmakedefine HAVE_GETIFADDRS 1 +#cmakedefine HAVE_GETIFADDRS ${HAVE_GETIFADDRS} /* Define to 1 if you have the getnameinfo function. */ -#cmakedefine HAVE_GETNAMEINFO 1 +#cmakedefine HAVE_GETNAMEINFO ${HAVE_GETNAMEINFO} /* Define to 1 if you have the `getpass_r' function. */ -#cmakedefine HAVE_GETPASS_R 1 +#cmakedefine HAVE_GETPASS_R ${HAVE_GETPASS_R} /* Define to 1 if you have the `getppid' function. */ -#cmakedefine HAVE_GETPPID 1 +#cmakedefine HAVE_GETPPID ${HAVE_GETPPID} /* Define to 1 if you have the `getprotobyname' function. */ -#cmakedefine HAVE_GETPROTOBYNAME 1 +#cmakedefine HAVE_GETPROTOBYNAME ${HAVE_GETPROTOBYNAME} /* Define to 1 if you have the `getpwuid' function. */ -#cmakedefine HAVE_GETPWUID 1 +#cmakedefine HAVE_GETPWUID ${HAVE_GETPWUID} /* Define to 1 if you have the `getrlimit' function. */ -#cmakedefine HAVE_GETRLIMIT 1 +#cmakedefine HAVE_GETRLIMIT ${HAVE_GETRLIMIT} /* Define to 1 if you have the getservbyport_r function. */ -#cmakedefine HAVE_GETSERVBYPORT_R 1 +#cmakedefine HAVE_GETSERVBYPORT_R ${HAVE_GETSERVBYPORT_R} /* Define to 1 if you have the `gettimeofday' function. */ -#cmakedefine HAVE_GETTIMEOFDAY 1 +#cmakedefine HAVE_GETTIMEOFDAY ${HAVE_GETTIMEOFDAY} /* Define to 1 if you have a working glibc-style strerror_r function. */ -#cmakedefine HAVE_GLIBC_STRERROR_R 1 +#cmakedefine HAVE_GLIBC_STRERROR_R ${HAVE_GLIBC_STRERROR_R} /* Define to 1 if you have a working gmtime_r function. */ -#cmakedefine HAVE_GMTIME_R 1 +#cmakedefine HAVE_GMTIME_R ${HAVE_GMTIME_R} /* if you have the gssapi libraries */ -#cmakedefine HAVE_GSSAPI 1 +#cmakedefine HAVE_GSSAPI ${HAVE_GSSAPI} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_GSSAPI_GSSAPI_GENERIC_H 1 +#cmakedefine HAVE_GSSAPI_GSSAPI_GENERIC_H ${HAVE_GSSAPI_GSSAPI_GENERIC_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_GSSAPI_GSSAPI_H 1 +#cmakedefine HAVE_GSSAPI_GSSAPI_H ${HAVE_GSSAPI_GSSAPI_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_GSSAPI_GSSAPI_KRB5_H 1 +#cmakedefine HAVE_GSSAPI_GSSAPI_KRB5_H ${HAVE_GSSAPI_GSSAPI_KRB5_H} /* if you have the GNU gssapi libraries */ -#cmakedefine HAVE_GSSGNU 1 +#cmakedefine HAVE_GSSGNU ${HAVE_GSSGNU} /* if you have the Heimdal gssapi libraries */ -#cmakedefine HAVE_GSSHEIMDAL 1 +#cmakedefine HAVE_GSSHEIMDAL ${HAVE_GSSHEIMDAL} /* if you have the MIT gssapi libraries */ -#cmakedefine HAVE_GSSMIT 1 +#cmakedefine HAVE_GSSMIT ${HAVE_GSSMIT} /* Define to 1 if you have the `idna_strerror' function. */ -#cmakedefine HAVE_IDNA_STRERROR 1 +#cmakedefine HAVE_IDNA_STRERROR ${HAVE_IDNA_STRERROR} /* Define to 1 if you have the `idn_free' function. */ -#cmakedefine HAVE_IDN_FREE 1 +#cmakedefine HAVE_IDN_FREE ${HAVE_IDN_FREE} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_IDN_FREE_H 1 +#cmakedefine HAVE_IDN_FREE_H ${HAVE_IDN_FREE_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_IFADDRS_H 1 +#cmakedefine HAVE_IFADDRS_H ${HAVE_IFADDRS_H} /* Define to 1 if you have the `inet_addr' function. */ -#cmakedefine HAVE_INET_ADDR 1 +#cmakedefine HAVE_INET_ADDR ${HAVE_INET_ADDR} /* Define to 1 if you have the inet_ntoa_r function. */ -#cmakedefine HAVE_INET_NTOA_R 1 +#cmakedefine HAVE_INET_NTOA_R ${HAVE_INET_NTOA_R} /* inet_ntoa_r() takes 2 args */ -#cmakedefine HAVE_INET_NTOA_R_2 1 +#cmakedefine HAVE_INET_NTOA_R_2 ${HAVE_INET_NTOA_R_2} /* inet_ntoa_r() takes 3 args */ -#cmakedefine HAVE_INET_NTOA_R_3 1 +#cmakedefine HAVE_INET_NTOA_R_3 ${HAVE_INET_NTOA_R_3} /* Define to 1 if you have a IPv6 capable working inet_ntop function. */ -#cmakedefine HAVE_INET_NTOP 1 +#cmakedefine HAVE_INET_NTOP ${HAVE_INET_NTOP} /* Define to 1 if you have a IPv6 capable working inet_pton function. */ -#cmakedefine HAVE_INET_PTON 1 +#cmakedefine HAVE_INET_PTON ${HAVE_INET_PTON} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_INTTYPES_H 1 +#cmakedefine HAVE_INTTYPES_H ${HAVE_INTTYPES_H} /* Define to 1 if you have the ioctl function. */ -#cmakedefine HAVE_IOCTL 1 +#cmakedefine HAVE_IOCTL ${HAVE_IOCTL} /* Define to 1 if you have the ioctlsocket function. */ -#cmakedefine HAVE_IOCTLSOCKET 1 +#cmakedefine HAVE_IOCTLSOCKET ${HAVE_IOCTLSOCKET} /* Define to 1 if you have the IoctlSocket camel case function. */ -#cmakedefine HAVE_IOCTLSOCKET_CAMEL 1 +#cmakedefine HAVE_IOCTLSOCKET_CAMEL ${HAVE_IOCTLSOCKET_CAMEL} /* Define to 1 if you have a working IoctlSocket camel case FIONBIO function. */ -#cmakedefine HAVE_IOCTLSOCKET_CAMEL_FIONBIO 1 +#cmakedefine HAVE_IOCTLSOCKET_CAMEL_FIONBIO ${HAVE_IOCTLSOCKET_CAMEL_FIONBIO} /* Define to 1 if you have a working ioctlsocket FIONBIO function. */ -#cmakedefine HAVE_IOCTLSOCKET_FIONBIO 1 +#cmakedefine HAVE_IOCTLSOCKET_FIONBIO ${HAVE_IOCTLSOCKET_FIONBIO} /* Define to 1 if you have a working ioctl FIONBIO function. */ -#cmakedefine HAVE_IOCTL_FIONBIO 1 +#cmakedefine HAVE_IOCTL_FIONBIO ${HAVE_IOCTL_FIONBIO} /* Define to 1 if you have a working ioctl SIOCGIFADDR function. */ -#cmakedefine HAVE_IOCTL_SIOCGIFADDR 1 +#cmakedefine HAVE_IOCTL_SIOCGIFADDR ${HAVE_IOCTL_SIOCGIFADDR} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_IO_H 1 +#cmakedefine HAVE_IO_H ${HAVE_IO_H} /* if you have the Kerberos4 libraries (including -ldes) */ -#cmakedefine HAVE_KRB4 1 +#cmakedefine HAVE_KRB4 ${HAVE_KRB4} /* Define to 1 if you have the `krb_get_our_ip_for_realm' function. */ -#cmakedefine HAVE_KRB_GET_OUR_IP_FOR_REALM 1 +#cmakedefine HAVE_KRB_GET_OUR_IP_FOR_REALM ${HAVE_KRB_GET_OUR_IP_FOR_REALM} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_KRB_H 1 +#cmakedefine HAVE_KRB_H ${HAVE_KRB_H} /* Define to 1 if you have the lber.h header file. */ -#cmakedefine HAVE_LBER_H 1 +#cmakedefine HAVE_LBER_H ${HAVE_LBER_H} /* Define to 1 if you have the ldapssl.h header file. */ -#cmakedefine HAVE_LDAPSSL_H 1 +#cmakedefine HAVE_LDAPSSL_H ${HAVE_LDAPSSL_H} /* Define to 1 if you have the ldap.h header file. */ -#cmakedefine HAVE_LDAP_H 1 +#cmakedefine HAVE_LDAP_H ${HAVE_LDAP_H} /* Use LDAPS implementation */ -#cmakedefine HAVE_LDAP_SSL 1 +#cmakedefine HAVE_LDAP_SSL ${HAVE_LDAP_SSL} /* Define to 1 if you have the ldap_ssl.h header file. */ -#cmakedefine HAVE_LDAP_SSL_H 1 +#cmakedefine HAVE_LDAP_SSL_H ${HAVE_LDAP_SSL_H} /* Define to 1 if you have the `ldap_url_parse' function. */ -#cmakedefine HAVE_LDAP_URL_PARSE 1 +#cmakedefine HAVE_LDAP_URL_PARSE ${HAVE_LDAP_URL_PARSE} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_LIBGEN_H 1 +#cmakedefine HAVE_LIBGEN_H ${HAVE_LIBGEN_H} /* Define to 1 if you have the `idn' library (-lidn). */ -#cmakedefine HAVE_LIBIDN 1 +#cmakedefine HAVE_LIBIDN ${HAVE_LIBIDN} /* Define to 1 if you have the `resolv' library (-lresolv). */ -#cmakedefine HAVE_LIBRESOLV 1 +#cmakedefine HAVE_LIBRESOLV ${HAVE_LIBRESOLV} /* Define to 1 if you have the `resolve' library (-lresolve). */ -#cmakedefine HAVE_LIBRESOLVE 1 +#cmakedefine HAVE_LIBRESOLVE ${HAVE_LIBRESOLVE} /* Define to 1 if you have the `socket' library (-lsocket). */ -#cmakedefine HAVE_LIBSOCKET 1 +#cmakedefine HAVE_LIBSOCKET ${HAVE_LIBSOCKET} /* Define to 1 if you have the `ssh2' library (-lssh2). */ -#cmakedefine HAVE_LIBSSH2 1 - -/* Define to 1 if libssh2 provides `libssh2_version'. */ -#cmakedefine HAVE_LIBSSH2_VERSION 1 - -/* Define to 1 if libssh2 provides `libssh2_init'. */ -#cmakedefine HAVE_LIBSSH2_INIT 1 - -/* Define to 1 if libssh2 provides `libssh2_exit'. */ -#cmakedefine HAVE_LIBSSH2_EXIT 1 - -/* Define to 1 if libssh2 provides `libssh2_scp_send64'. */ -#cmakedefine HAVE_LIBSSH2_SCP_SEND64 1 - -/* Define to 1 if libssh2 provides `libssh2_session_handshake'. */ -#cmakedefine HAVE_LIBSSH2_SESSION_HANDSHAKE 1 +#cmakedefine HAVE_LIBSSH2 ${HAVE_LIBSSH2} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_LIBSSH2_H 1 +#cmakedefine HAVE_LIBSSH2_H ${HAVE_LIBSSH2_H} /* Define to 1 if you have the `ssl' library (-lssl). */ -#cmakedefine HAVE_LIBSSL 1 +#cmakedefine HAVE_LIBSSL ${HAVE_LIBSSL} /* if zlib is available */ -#cmakedefine HAVE_LIBZ 1 +#cmakedefine HAVE_LIBZ ${HAVE_LIBZ} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_LIMITS_H 1 +#cmakedefine HAVE_LIMITS_H ${HAVE_LIMITS_H} /* if your compiler supports LL */ -#cmakedefine HAVE_LL 1 +#cmakedefine HAVE_LL ${HAVE_LL} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_LOCALE_H 1 +#cmakedefine HAVE_LOCALE_H ${HAVE_LOCALE_H} /* Define to 1 if you have a working localtime_r function. */ -#cmakedefine HAVE_LOCALTIME_R 1 +#cmakedefine HAVE_LOCALTIME_R ${HAVE_LOCALTIME_R} /* Define to 1 if the compiler supports the 'long long' data type. */ -#cmakedefine HAVE_LONGLONG 1 +#cmakedefine HAVE_LONGLONG ${HAVE_LONGLONG} /* Define to 1 if you have the malloc.h header file. */ -#cmakedefine HAVE_MALLOC_H 1 +#cmakedefine HAVE_MALLOC_H ${HAVE_MALLOC_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_MEMORY_H 1 +#cmakedefine HAVE_MEMORY_H ${HAVE_MEMORY_H} /* Define to 1 if you have the MSG_NOSIGNAL flag. */ -#cmakedefine HAVE_MSG_NOSIGNAL 1 +#cmakedefine HAVE_MSG_NOSIGNAL ${HAVE_MSG_NOSIGNAL} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_NETDB_H 1 +#cmakedefine HAVE_NETDB_H ${HAVE_NETDB_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_NETINET_IN_H 1 +#cmakedefine HAVE_NETINET_IN_H ${HAVE_NETINET_IN_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_NETINET_TCP_H 1 +#cmakedefine HAVE_NETINET_TCP_H ${HAVE_NETINET_TCP_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_NET_IF_H 1 +#cmakedefine HAVE_NET_IF_H ${HAVE_NET_IF_H} /* Define to 1 if NI_WITHSCOPEID exists and works. */ -#cmakedefine HAVE_NI_WITHSCOPEID 1 +#cmakedefine HAVE_NI_WITHSCOPEID ${HAVE_NI_WITHSCOPEID} -/* if you have an old MIT gssapi library, lacking GSS_C_NT_HOSTBASED_SERVICE */ -#cmakedefine HAVE_OLD_GSSMIT 1 +/* if you have an old MIT gssapi library, lacking GSS_C_NT_HOSTBASED_SERVICE + */ +#cmakedefine HAVE_OLD_GSSMIT ${HAVE_OLD_GSSMIT} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_OPENSSL_CRYPTO_H 1 +#cmakedefine HAVE_OPENSSL_CRYPTO_H ${HAVE_OPENSSL_CRYPTO_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_OPENSSL_ENGINE_H 1 +#cmakedefine HAVE_OPENSSL_ENGINE_H ${HAVE_OPENSSL_ENGINE_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_OPENSSL_ERR_H 1 +#cmakedefine HAVE_OPENSSL_ERR_H ${HAVE_OPENSSL_ERR_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_OPENSSL_PEM_H 1 +#cmakedefine HAVE_OPENSSL_PEM_H ${HAVE_OPENSSL_PEM_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_OPENSSL_PKCS12_H 1 +#cmakedefine HAVE_OPENSSL_PKCS12_H ${HAVE_OPENSSL_PKCS12_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_OPENSSL_RSA_H 1 +#cmakedefine HAVE_OPENSSL_RSA_H ${HAVE_OPENSSL_RSA_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_OPENSSL_SSL_H 1 +#cmakedefine HAVE_OPENSSL_SSL_H ${HAVE_OPENSSL_SSL_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_OPENSSL_X509_H 1 +#cmakedefine HAVE_OPENSSL_X509_H ${HAVE_OPENSSL_X509_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_PEM_H 1 +#cmakedefine HAVE_PEM_H ${HAVE_PEM_H} /* Define to 1 if you have the `perror' function. */ -#cmakedefine HAVE_PERROR 1 +#cmakedefine HAVE_PERROR ${HAVE_PERROR} /* Define to 1 if you have the `pipe' function. */ -#cmakedefine HAVE_PIPE 1 +#cmakedefine HAVE_PIPE ${HAVE_PIPE} /* Define to 1 if you have a working poll function. */ -#cmakedefine HAVE_POLL 1 +#cmakedefine HAVE_POLL ${HAVE_POLL} /* If you have a fine poll */ -#cmakedefine HAVE_POLL_FINE 1 +#cmakedefine HAVE_POLL_FINE ${HAVE_POLL_FINE} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_POLL_H 1 +#cmakedefine HAVE_POLL_H ${HAVE_POLL_H} /* Define to 1 if you have a working POSIX-style strerror_r function. */ -#cmakedefine HAVE_POSIX_STRERROR_R 1 - -/* Define to 1 if you have the header file */ -#cmakedefine HAVE_PTHREAD_H 1 +#cmakedefine HAVE_POSIX_STRERROR_R ${HAVE_POSIX_STRERROR_R} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_PWD_H 1 +#cmakedefine HAVE_PWD_H ${HAVE_PWD_H} /* Define to 1 if you have the `RAND_egd' function. */ -#cmakedefine HAVE_RAND_EGD 1 +#cmakedefine HAVE_RAND_EGD ${HAVE_RAND_EGD} /* Define to 1 if you have the `RAND_screen' function. */ -#cmakedefine HAVE_RAND_SCREEN 1 +#cmakedefine HAVE_RAND_SCREEN ${HAVE_RAND_SCREEN} /* Define to 1 if you have the `RAND_status' function. */ -#cmakedefine HAVE_RAND_STATUS 1 +#cmakedefine HAVE_RAND_STATUS ${HAVE_RAND_STATUS} /* Define to 1 if you have the recv function. */ -#cmakedefine HAVE_RECV 1 +#cmakedefine HAVE_RECV ${HAVE_RECV} /* Define to 1 if you have the recvfrom function. */ -#cmakedefine HAVE_RECVFROM 1 +#cmakedefine HAVE_RECVFROM ${HAVE_RECVFROM} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_RSA_H 1 +#cmakedefine HAVE_RSA_H ${HAVE_RSA_H} /* Define to 1 if you have the select function. */ -#cmakedefine HAVE_SELECT 1 +#cmakedefine HAVE_SELECT ${HAVE_SELECT} /* Define to 1 if you have the send function. */ -#cmakedefine HAVE_SEND 1 +#cmakedefine HAVE_SEND ${HAVE_SEND} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SETJMP_H 1 +#cmakedefine HAVE_SETJMP_H ${HAVE_SETJMP_H} /* Define to 1 if you have the `setlocale' function. */ -#cmakedefine HAVE_SETLOCALE 1 +#cmakedefine HAVE_SETLOCALE ${HAVE_SETLOCALE} /* Define to 1 if you have the `setmode' function. */ -#cmakedefine HAVE_SETMODE 1 +#cmakedefine HAVE_SETMODE ${HAVE_SETMODE} /* Define to 1 if you have the `setrlimit' function. */ -#cmakedefine HAVE_SETRLIMIT 1 +#cmakedefine HAVE_SETRLIMIT ${HAVE_SETRLIMIT} /* Define to 1 if you have the setsockopt function. */ -#cmakedefine HAVE_SETSOCKOPT 1 +#cmakedefine HAVE_SETSOCKOPT ${HAVE_SETSOCKOPT} /* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */ -#cmakedefine HAVE_SETSOCKOPT_SO_NONBLOCK 1 +#cmakedefine HAVE_SETSOCKOPT_SO_NONBLOCK ${HAVE_SETSOCKOPT_SO_NONBLOCK} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SGTTY_H 1 +#cmakedefine HAVE_SGTTY_H ${HAVE_SGTTY_H} /* Define to 1 if you have the sigaction function. */ -#cmakedefine HAVE_SIGACTION 1 +#cmakedefine HAVE_SIGACTION ${HAVE_SIGACTION} /* Define to 1 if you have the siginterrupt function. */ -#cmakedefine HAVE_SIGINTERRUPT 1 +#cmakedefine HAVE_SIGINTERRUPT ${HAVE_SIGINTERRUPT} /* Define to 1 if you have the signal function. */ -#cmakedefine HAVE_SIGNAL 1 +#cmakedefine HAVE_SIGNAL ${HAVE_SIGNAL} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SIGNAL_H 1 +#cmakedefine HAVE_SIGNAL_H ${HAVE_SIGNAL_H} /* Define to 1 if you have the sigsetjmp function or macro. */ -#cmakedefine HAVE_SIGSETJMP 1 +#cmakedefine HAVE_SIGSETJMP ${HAVE_SIGSETJMP} /* Define to 1 if sig_atomic_t is an available typedef. */ -#cmakedefine HAVE_SIG_ATOMIC_T 1 +#cmakedefine HAVE_SIG_ATOMIC_T ${HAVE_SIG_ATOMIC_T} /* Define to 1 if sig_atomic_t is already defined as volatile. */ -#cmakedefine HAVE_SIG_ATOMIC_T_VOLATILE 1 +#cmakedefine HAVE_SIG_ATOMIC_T_VOLATILE ${HAVE_SIG_ATOMIC_T_VOLATILE} /* Define to 1 if struct sockaddr_in6 has the sin6_scope_id member */ -#cmakedefine HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1 +#cmakedefine HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID ${HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID} /* Define to 1 if you have the `socket' function. */ -#cmakedefine HAVE_SOCKET 1 +#cmakedefine HAVE_SOCKET ${HAVE_SOCKET} + +/* Define this if you have the SPNEGO library fbopenssl */ +#cmakedefine HAVE_SPNEGO ${HAVE_SPNEGO} /* Define to 1 if you have the `SSL_get_shutdown' function. */ -#cmakedefine HAVE_SSL_GET_SHUTDOWN 1 +#cmakedefine HAVE_SSL_GET_SHUTDOWN ${HAVE_SSL_GET_SHUTDOWN} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SSL_H 1 +#cmakedefine HAVE_SSL_H ${HAVE_SSL_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDBOOL_H 1 +#cmakedefine HAVE_STDBOOL_H ${HAVE_STDBOOL_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDINT_H 1 +#cmakedefine HAVE_STDINT_H ${HAVE_STDINT_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDIO_H 1 +#cmakedefine HAVE_STDIO_H ${HAVE_STDIO_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDLIB_H 1 +#cmakedefine HAVE_STDLIB_H ${HAVE_STDLIB_H} /* Define to 1 if you have the strcasecmp function. */ -#cmakedefine HAVE_STRCASECMP 1 +#cmakedefine HAVE_STRCASECMP ${HAVE_STRCASECMP} /* Define to 1 if you have the strcasestr function. */ -#cmakedefine HAVE_STRCASESTR 1 +#cmakedefine HAVE_STRCASESTR ${HAVE_STRCASESTR} /* Define to 1 if you have the strcmpi function. */ -#cmakedefine HAVE_STRCMPI 1 +#cmakedefine HAVE_STRCMPI ${HAVE_STRCMPI} /* Define to 1 if you have the strdup function. */ -#cmakedefine HAVE_STRDUP 1 +#cmakedefine HAVE_STRDUP ${HAVE_STRDUP} /* Define to 1 if you have the strerror_r function. */ -#cmakedefine HAVE_STRERROR_R 1 +#cmakedefine HAVE_STRERROR_R ${HAVE_STRERROR_R} /* Define to 1 if you have the stricmp function. */ -#cmakedefine HAVE_STRICMP 1 +#cmakedefine HAVE_STRICMP ${HAVE_STRICMP} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STRINGS_H 1 +#cmakedefine HAVE_STRINGS_H ${HAVE_STRINGS_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STRING_H 1 +#cmakedefine HAVE_STRING_H ${HAVE_STRING_H} /* Define to 1 if you have the strlcat function. */ -#cmakedefine HAVE_STRLCAT 1 +#cmakedefine HAVE_STRLCAT ${HAVE_STRLCAT} /* Define to 1 if you have the `strlcpy' function. */ -#cmakedefine HAVE_STRLCPY 1 +#cmakedefine HAVE_STRLCPY ${HAVE_STRLCPY} /* Define to 1 if you have the strncasecmp function. */ -#cmakedefine HAVE_STRNCASECMP 1 +#cmakedefine HAVE_STRNCASECMP ${HAVE_STRNCASECMP} /* Define to 1 if you have the strncmpi function. */ -#cmakedefine HAVE_STRNCMPI 1 +#cmakedefine HAVE_STRNCMPI ${HAVE_STRNCMPI} /* Define to 1 if you have the strnicmp function. */ -#cmakedefine HAVE_STRNICMP 1 +#cmakedefine HAVE_STRNICMP ${HAVE_STRNICMP} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STROPTS_H 1 +#cmakedefine HAVE_STROPTS_H ${HAVE_STROPTS_H} /* Define to 1 if you have the strstr function. */ -#cmakedefine HAVE_STRSTR 1 +#cmakedefine HAVE_STRSTR ${HAVE_STRSTR} /* Define to 1 if you have the strtok_r function. */ -#cmakedefine HAVE_STRTOK_R 1 +#cmakedefine HAVE_STRTOK_R ${HAVE_STRTOK_R} /* Define to 1 if you have the strtoll function. */ -#cmakedefine HAVE_STRTOLL 1 +#cmakedefine HAVE_STRTOLL ${HAVE_STRTOLL} /* if struct sockaddr_storage is defined */ -#cmakedefine HAVE_STRUCT_SOCKADDR_STORAGE 1 +#cmakedefine HAVE_STRUCT_SOCKADDR_STORAGE ${HAVE_STRUCT_SOCKADDR_STORAGE} /* Define to 1 if you have the timeval struct. */ -#cmakedefine HAVE_STRUCT_TIMEVAL 1 +#cmakedefine HAVE_STRUCT_TIMEVAL ${HAVE_STRUCT_TIMEVAL} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_FILIO_H 1 +#cmakedefine HAVE_SYS_FILIO_H ${HAVE_SYS_FILIO_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_IOCTL_H 1 +#cmakedefine HAVE_SYS_IOCTL_H ${HAVE_SYS_IOCTL_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_PARAM_H 1 +#cmakedefine HAVE_SYS_PARAM_H ${HAVE_SYS_PARAM_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_POLL_H 1 +#cmakedefine HAVE_SYS_POLL_H ${HAVE_SYS_POLL_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_RESOURCE_H 1 +#cmakedefine HAVE_SYS_RESOURCE_H ${HAVE_SYS_RESOURCE_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_SELECT_H 1 +#cmakedefine HAVE_SYS_SELECT_H ${HAVE_SYS_SELECT_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_SOCKET_H 1 +#cmakedefine HAVE_SYS_SOCKET_H ${HAVE_SYS_SOCKET_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_SOCKIO_H 1 +#cmakedefine HAVE_SYS_SOCKIO_H ${HAVE_SYS_SOCKIO_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_STAT_H 1 +#cmakedefine HAVE_SYS_STAT_H ${HAVE_SYS_STAT_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_TIME_H 1 +#cmakedefine HAVE_SYS_TIME_H ${HAVE_SYS_TIME_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_TYPES_H 1 +#cmakedefine HAVE_SYS_TYPES_H ${HAVE_SYS_TYPES_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_UIO_H 1 +#cmakedefine HAVE_SYS_UIO_H ${HAVE_SYS_UIO_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_UN_H 1 +#cmakedefine HAVE_SYS_UN_H ${HAVE_SYS_UN_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_UTIME_H 1 +#cmakedefine HAVE_SYS_UTIME_H ${HAVE_SYS_UTIME_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_TERMIOS_H 1 +#cmakedefine HAVE_TERMIOS_H ${HAVE_TERMIOS_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_TERMIO_H 1 +#cmakedefine HAVE_TERMIO_H ${HAVE_TERMIO_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_TIME_H 1 +#cmakedefine HAVE_TIME_H ${HAVE_TIME_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_TLD_H 1 +#cmakedefine HAVE_TLD_H ${HAVE_TLD_H} /* Define to 1 if you have the `tld_strerror' function. */ -#cmakedefine HAVE_TLD_STRERROR 1 +#cmakedefine HAVE_TLD_STRERROR ${HAVE_TLD_STRERROR} /* Define to 1 if you have the `uname' function. */ -#cmakedefine HAVE_UNAME 1 +#cmakedefine HAVE_UNAME ${HAVE_UNAME} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_UNISTD_H 1 +#cmakedefine HAVE_UNISTD_H ${HAVE_UNISTD_H} /* Define to 1 if you have the `utime' function. */ -#cmakedefine HAVE_UTIME 1 +#cmakedefine HAVE_UTIME ${HAVE_UTIME} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_UTIME_H 1 +#cmakedefine HAVE_UTIME_H ${HAVE_UTIME_H} /* Define to 1 if compiler supports C99 variadic macro style. */ -#cmakedefine HAVE_VARIADIC_MACROS_C99 1 +#cmakedefine HAVE_VARIADIC_MACROS_C99 ${HAVE_VARIADIC_MACROS_C99} /* Define to 1 if compiler supports old gcc variadic macro style. */ -#cmakedefine HAVE_VARIADIC_MACROS_GCC 1 +#cmakedefine HAVE_VARIADIC_MACROS_GCC ${HAVE_VARIADIC_MACROS_GCC} /* Define to 1 if you have the winber.h header file. */ -#cmakedefine HAVE_WINBER_H 1 +#cmakedefine HAVE_WINBER_H ${HAVE_WINBER_H} /* Define to 1 if you have the windows.h header file. */ -#cmakedefine HAVE_WINDOWS_H 1 +#cmakedefine HAVE_WINDOWS_H ${HAVE_WINDOWS_H} /* Define to 1 if you have the winldap.h header file. */ -#cmakedefine HAVE_WINLDAP_H 1 +#cmakedefine HAVE_WINLDAP_H ${HAVE_WINLDAP_H} /* Define to 1 if you have the winsock2.h header file. */ -#cmakedefine HAVE_WINSOCK2_H 1 +#cmakedefine HAVE_WINSOCK2_H ${HAVE_WINSOCK2_H} /* Define to 1 if you have the winsock.h header file. */ -#cmakedefine HAVE_WINSOCK_H 1 +#cmakedefine HAVE_WINSOCK_H ${HAVE_WINSOCK_H} /* Define this symbol if your OS supports changing the contents of argv */ -#cmakedefine HAVE_WRITABLE_ARGV 1 +#cmakedefine HAVE_WRITABLE_ARGV ${HAVE_WRITABLE_ARGV} /* Define to 1 if you have the writev function. */ -#cmakedefine HAVE_WRITEV 1 +#cmakedefine HAVE_WRITEV ${HAVE_WRITEV} /* Define to 1 if you have the ws2tcpip.h header file. */ -#cmakedefine HAVE_WS2TCPIP_H 1 +#cmakedefine HAVE_WS2TCPIP_H ${HAVE_WS2TCPIP_H} /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_X509_H 1 +#cmakedefine HAVE_X509_H ${HAVE_X509_H} /* Define if you have the header file. */ -#cmakedefine HAVE_PROCESS_H 1 +#cmakedefine HAVE_PROCESS_H ${HAVE_PROCESS_H} /* if you have the zlib.h header file */ -#cmakedefine HAVE_ZLIB_H 1 +#cmakedefine HAVE_ZLIB_H ${HAVE_ZLIB_H} /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #cmakedefine LT_OBJDIR ${LT_OBJDIR} /* If you lack a fine basename() prototype */ -#cmakedefine NEED_BASENAME_PROTO 1 +#cmakedefine NEED_BASENAME_PROTO ${NEED_BASENAME_PROTO} /* Define to 1 if you need the lber.h header file even with ldap.h */ -#cmakedefine NEED_LBER_H 1 +#cmakedefine NEED_LBER_H ${NEED_LBER_H} /* Define to 1 if you need the malloc.h header file even with stdlib.h */ -#cmakedefine NEED_MALLOC_H 1 +#cmakedefine NEED_MALLOC_H ${NEED_MALLOC_H} /* Define to 1 if _REENTRANT preprocessor symbol must be defined. */ -#cmakedefine NEED_REENTRANT 1 +#cmakedefine NEED_REENTRANT ${NEED_REENTRANT} /* cpu-machine-OS */ #cmakedefine OS ${OS} @@ -775,7 +761,7 @@ #cmakedefine RECVFROM_TYPE_ARG2 ${RECVFROM_TYPE_ARG2} /* Define to 1 if the type pointed by arg 2 for recvfrom is void. */ -#cmakedefine RECVFROM_TYPE_ARG2_IS_VOID 1 +#cmakedefine RECVFROM_TYPE_ARG2_IS_VOID ${RECVFROM_TYPE_ARG2_IS_VOID} /* Define to the type of arg 3 for recvfrom. */ #cmakedefine RECVFROM_TYPE_ARG3 ${RECVFROM_TYPE_ARG3} @@ -787,13 +773,13 @@ #cmakedefine RECVFROM_TYPE_ARG5 ${RECVFROM_TYPE_ARG5} /* Define to 1 if the type pointed by arg 5 for recvfrom is void. */ -#cmakedefine RECVFROM_TYPE_ARG5_IS_VOID 1 +#cmakedefine RECVFROM_TYPE_ARG5_IS_VOID ${RECVFROM_TYPE_ARG5_IS_VOID} /* Define to the type pointed by arg 6 for recvfrom. */ #cmakedefine RECVFROM_TYPE_ARG6 ${RECVFROM_TYPE_ARG6} /* Define to 1 if the type pointed by arg 6 for recvfrom is void. */ -#cmakedefine RECVFROM_TYPE_ARG6_IS_VOID 1 +#cmakedefine RECVFROM_TYPE_ARG6_IS_VOID ${RECVFROM_TYPE_ARG6_IS_VOID} /* Define to the function return type for recvfrom. */ #cmakedefine RECVFROM_TYPE_RETV ${RECVFROM_TYPE_RETV} @@ -871,65 +857,56 @@ #cmakedefine SIZEOF_VOIDP ${SIZEOF_VOIDP} /* Define to 1 if you have the ANSI C header files. */ -#cmakedefine STDC_HEADERS 1 +#cmakedefine STDC_HEADERS ${STDC_HEADERS} /* Define to the type of arg 3 for strerror_r. */ #cmakedefine STRERROR_R_TYPE_ARG3 ${STRERROR_R_TYPE_ARG3} /* Define to 1 if you can safely include both and . */ -#cmakedefine TIME_WITH_SYS_TIME 1 +#cmakedefine TIME_WITH_SYS_TIME ${TIME_WITH_SYS_TIME} /* Define if you want to enable c-ares support */ -#cmakedefine USE_ARES 1 - -/* Define if you want to enable POSIX threaded DNS lookup */ -#cmakedefine USE_THREADS_POSIX 1 +#cmakedefine USE_ARES ${USE_ARES} /* Define to disable non-blocking sockets. */ -#cmakedefine USE_BLOCKING_SOCKETS 1 +#cmakedefine USE_BLOCKING_SOCKETS ${USE_BLOCKING_SOCKETS} /* if GnuTLS is enabled */ -#cmakedefine USE_GNUTLS 1 +#cmakedefine USE_GNUTLS ${USE_GNUTLS} /* if PolarSSL is enabled */ -#cmakedefine USE_POLARSSL 1 +#cmakedefine USE_POLARSSL ${USE_POLARSSL} /* if libSSH2 is in use */ -#cmakedefine USE_LIBSSH2 1 +#cmakedefine USE_LIBSSH2 ${USE_LIBSSH2} /* If you want to build curl with the built-in manual */ -#cmakedefine USE_MANUAL 1 +#cmakedefine USE_MANUAL ${USE_MANUAL} /* if NSS is enabled */ -#cmakedefine USE_NSS 1 - -/* if you want to use OpenLDAP code instead of legacy ldap implementation */ -#cmakedefine USE_OPENLDAP 1 +#cmakedefine USE_NSS ${USE_NSS} /* if OpenSSL is in use */ -#cmakedefine USE_OPENSSL 1 +#cmakedefine USE_OPENSSL ${USE_OPENSSL} /* if SSL is enabled */ -#cmakedefine USE_SSLEAY 1 - -/* if Unix domain sockets are enabled */ -#cmakedefine USE_UNIX_SOCKETS +#cmakedefine USE_SSLEAY ${USE_SSLEAY} /* Define to 1 if you are building a Windows target without large file support. */ -#cmakedefine USE_WIN32_LARGE_FILES 1 +#cmakedefine USE_WIN32_LARGE_FILES ${USE_WIN32_LARGE_FILES} /* to enable SSPI support */ -#cmakedefine USE_WINDOWS_SSPI 1 +#cmakedefine USE_WINDOWS_SSPI ${USE_WINDOWS_SSPI} /* Define to 1 if using yaSSL in OpenSSL compatibility mode. */ -#cmakedefine USE_YASSLEMUL 1 +#cmakedefine USE_YASSLEMUL ${USE_YASSLEMUL} /* Version number of package */ #cmakedefine VERSION ${VERSION} /* Define to avoid automatic inclusion of winsock.h */ -#cmakedefine WIN32_LEAN_AND_MEAN 1 +#cmakedefine WIN32_LEAN_AND_MEAN ${WIN32_LEAN_AND_MEAN} /* Define to 1 if OS is AIX. */ #ifndef _ALL_SOURCE diff --git a/lib/curl_endian.c b/lib/curl_endian.c deleted file mode 100644 index eb536de..0000000 --- a/lib/curl_endian.c +++ /dev/null @@ -1,233 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * 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 http://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 "curl_endian.h" - -/* - * Curl_read16_le() - * - * This function converts a 16-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 2 byte buffer. - * - * Returns the integer. - */ -unsigned short Curl_read16_le(unsigned char *buf) -{ - return (unsigned short)(((unsigned short)buf[0]) | - ((unsigned short)buf[1] << 8)); -} - -/* - * Curl_read32_le() - * - * This function converts a 32-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 4 byte buffer. - * - * Returns the integer. - */ -unsigned int Curl_read32_le(unsigned char *buf) -{ - return ((unsigned int)buf[0]) | ((unsigned int)buf[1] << 8) | - ((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(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(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() - * - * This function converts a 16-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 2 byte buffer. - * - * Returns the integer. - */ -unsigned short Curl_read16_be(unsigned char *buf) -{ - return (unsigned short)(((unsigned short)buf[0] << 8) | - ((unsigned short)buf[1])); -} - -/* - * 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(unsigned char *buf) -{ - return ((unsigned int)buf[0] << 24) | ((unsigned int)buf[1] << 16) | - ((unsigned int)buf[2] << 8) | ((unsigned int)buf[3]); -} - -/* - * 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(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(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 - -/* - * 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, - * to little endian format ready for sending down the wire. - * - * Parameters: - * - * value [in] - The 32-bit integer value. - * buffer [in] - A pointer to the output buffer. - */ -void Curl_write32_le(const int value, unsigned char *buffer) -{ - buffer[0] = (char)(value & 0x000000FF); - buffer[1] = (char)((value & 0x0000FF00) >> 8); - buffer[2] = (char)((value & 0x00FF0000) >> 16); - buffer[3] = (char)((value & 0xFF000000) >> 24); -} - -#if (CURL_SIZEOF_CURL_OFF_T > 4) -/* - * Curl_write64_le() - * - * This function converts a 64-bit integer from the native endian format, - * to little endian format ready for sending down the wire. - * - * Parameters: - * - * value [in] - The 64-bit integer value. - * buffer [in] - A pointer to the output buffer. - */ -#if defined(HAVE_LONGLONG) -void Curl_write64_le(const long long value, unsigned char *buffer) -#else -void Curl_write64_le(const __int64 value, unsigned char *buffer) -#endif -{ - Curl_write32_le((int)value, buffer); - Curl_write32_le((int)(value >> 32), buffer + 4); -} -#endif /* CURL_SIZEOF_CURL_OFF_T > 4 */ diff --git a/lib/curl_endian.h b/lib/curl_endian.h deleted file mode 100644 index e384279..0000000 --- a/lib/curl_endian.h +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef HEADER_CURL_ENDIAN_H -#define HEADER_CURL_ENDIAN_H -/*************************************************************************** - * _ _ ____ _ - * 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 http://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. - * - ***************************************************************************/ - -/* Converts a 16-bit integer from little endian */ -unsigned short Curl_read16_le(unsigned char *buf); - -/* Converts a 32-bit integer from little endian */ -unsigned int Curl_read32_le(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(unsigned char *buf); -#else -unsigned __int64 Curl_read64_le(unsigned char *buf); -#endif -#endif - -/* Converts a 16-bit integer from big endian */ -unsigned short Curl_read16_be(unsigned char *buf); - -/* Converts a 32-bit integer from big endian */ -unsigned int Curl_read32_be(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(unsigned char *buf); -#else -unsigned __int64 Curl_read64_be(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); - -#if (CURL_SIZEOF_CURL_OFF_T > 4) -/* Converts a 64-bit integer to little endian */ -#if defined(HAVE_LONGLONG) -void Curl_write64_le(const long long value, unsigned char *buffer); -#else -void Curl_write64_le(const __int64 value, unsigned char *buffer); -#endif -#endif - -#endif /* HEADER_CURL_ENDIAN_H */ diff --git a/lib/curl_gssapi.c b/lib/curl_gssapi.c index 2cd14ff..fabbe35 100644 --- a/lib/curl_gssapi.c +++ b/lib/curl_gssapi.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2011 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 2011, Daniel Stenberg, , 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,27 +27,17 @@ #include "curl_gssapi.h" #include "sendf.h" -static const char spnego_oid_bytes[] = "\x2b\x06\x01\x05\x05\x02"; -gss_OID_desc Curl_spnego_mech_oid = { 6, &spnego_oid_bytes }; -static const char krb5_oid_bytes[] = "\x2a\x86\x48\x86\xf7\x12\x01\x02\x02"; -gss_OID_desc Curl_krb5_mech_oid = { 9, &krb5_oid_bytes }; - OM_uint32 Curl_gss_init_sec_context( struct SessionHandle *data, - OM_uint32 *minor_status, - gss_ctx_id_t *context, + OM_uint32 * minor_status, + gss_ctx_id_t * context, gss_name_t target_name, - gss_OID mech_type, gss_channel_bindings_t input_chan_bindings, gss_buffer_t input_token, gss_buffer_t output_token, - const bool mutual_auth, - OM_uint32 *ret_flags) + OM_uint32 * ret_flags) { - OM_uint32 req_flags = GSS_C_REPLAY_FLAG; - - if(mutual_auth) - req_flags |= GSS_C_MUTUAL_FLAG; + OM_uint32 req_flags = GSS_C_MUTUAL_FLAG | GSS_C_REPLAY_FLAG; if(data->set.gssapi_delegation & CURLGSSAPI_DELEGATION_POLICY_FLAG) { #ifdef GSS_C_DELEG_POLICY_FLAG @@ -65,7 +55,7 @@ OM_uint32 Curl_gss_init_sec_context( GSS_C_NO_CREDENTIAL, /* cred_handle */ context, target_name, - mech_type, + GSS_C_NO_OID, /* mech_type */ req_flags, 0, /* time_req */ input_chan_bindings, @@ -76,45 +66,4 @@ OM_uint32 Curl_gss_init_sec_context( NULL /* time_rec */); } -/* - * Curl_gss_log_error() - * - * This is used to log a GSS-API error status. - * - * Parameters: - * - * data [in] - The session handle. - * status [in] - The status code. - * prefix [in] - The prefix of the log message. - */ -void Curl_gss_log_error(struct SessionHandle *data, OM_uint32 status, - const char *prefix) -{ - OM_uint32 maj_stat; - OM_uint32 min_stat; - OM_uint32 msg_ctx = 0; - gss_buffer_desc status_string; - char buf[1024]; - size_t len; - - snprintf(buf, sizeof(buf), "%s", prefix); - len = strlen(buf); - do { - maj_stat = gss_display_status(&min_stat, - status, - GSS_C_MECH_CODE, - GSS_C_NO_OID, - &msg_ctx, - &status_string); - if(sizeof(buf) > len + status_string.length + 1) { - snprintf(buf + len, sizeof(buf) - len, - ": %s", (char*)status_string.value); - len += status_string.length; - } - gss_release_buffer(&min_stat, &status_string); - } while(!GSS_ERROR(maj_stat) && msg_ctx != 0); - - infof(data, "%s\n", buf); -} - #endif /* HAVE_GSSAPI */ diff --git a/lib/curl_gssapi.h b/lib/curl_gssapi.h index 19aab64..ed33b51 100644 --- a/lib/curl_gssapi.h +++ b/lib/curl_gssapi.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2011 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 2011, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -39,36 +39,18 @@ # include #endif -extern gss_OID_desc Curl_spnego_mech_oid; -extern gss_OID_desc Curl_krb5_mech_oid; -/* Common method for using GSS-API */ +/* Common method for using gss api */ + OM_uint32 Curl_gss_init_sec_context( struct SessionHandle *data, - OM_uint32 *minor_status, - gss_ctx_id_t *context, + OM_uint32 * minor_status, + gss_ctx_id_t * context, gss_name_t target_name, - gss_OID mech_type, gss_channel_bindings_t input_chan_bindings, gss_buffer_t input_token, gss_buffer_t output_token, - const bool mutual_auth, - OM_uint32 *ret_flags); - -/* Helper to log a GSS-API error status */ -void Curl_gss_log_error(struct SessionHandle *data, OM_uint32 status, - const char *prefix); - -/* Provide some definitions missing in old headers */ -#ifdef HAVE_OLD_GSSMIT -#define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name -#define NCOMPAT 1 -#endif - -/* Define our privacy and integrity protection values */ -#define GSSAUTH_P_NONE 1 -#define GSSAUTH_P_INTEGRITY 2 -#define GSSAUTH_P_PRIVACY 4 + OM_uint32 * ret_flags); #endif /* HAVE_GSSAPI */ diff --git a/lib/curl_md4.h b/lib/curl_md4.h index 13c7903..b0be9cf 100644 --- a/lib/curl_md4.h +++ b/lib/curl_md4.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2010, Daniel Stenberg, , 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,12 +24,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) - +/* NSS crypto library does not provide the MD4 hash algorithm, so that we have + * a local implementation of it */ +#ifdef USE_NSS void Curl_md4it(unsigned char *output, const unsigned char *input, size_t len); - -#endif /* defined(USE_NSS) || defined(USE_OS400CRYPTO) */ +#endif /* USE_NSS */ #endif /* HEADER_CURL_MD4_H */ diff --git a/lib/curl_multibyte.c b/lib/curl_multibyte.c index 6e65722..6c02239 100644 --- a/lib/curl_multibyte.c +++ b/lib/curl_multibyte.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * 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 @@ -22,8 +22,7 @@ #include "curl_setup.h" -#if defined(USE_WIN32_IDN) || ((defined(USE_WINDOWS_SSPI) || \ - defined(CURL_LDAP_WIN)) && defined(UNICODE)) +#if defined(USE_WIN32_IDN) || (defined(USE_WINDOWS_SSPI) && defined(UNICODE)) /* * MultiByte conversions using Windows kernel32 library. @@ -80,4 +79,4 @@ char *Curl_convert_wchar_to_UTF8(const wchar_t *str_w) return str_utf8; } -#endif /* USE_WIN32_IDN || ((USE_WINDOWS_SSPI || CURL_LDAP_WIN) && UNICODE) */ +#endif /* USE_WIN32_IDN || (USE_WINDOWS_SSPI && UNICODE) */ diff --git a/lib/curl_multibyte.h b/lib/curl_multibyte.h index d024755..7ee5eae 100644 --- a/lib/curl_multibyte.h +++ b/lib/curl_multibyte.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * 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 @@ -23,8 +23,7 @@ ***************************************************************************/ #include "curl_setup.h" -#if defined(USE_WIN32_IDN) || ((defined(USE_WINDOWS_SSPI) || \ - defined(CURL_LDAP_WIN)) && defined(UNICODE)) +#if defined(USE_WIN32_IDN) || (defined(USE_WINDOWS_SSPI) && defined(UNICODE)) /* * MultiByte conversions using Windows kernel32 library. @@ -33,11 +32,10 @@ wchar_t *Curl_convert_UTF8_to_wchar(const char *str_utf8); char *Curl_convert_wchar_to_UTF8(const wchar_t *str_w); -#endif /* USE_WIN32_IDN || ((USE_WINDOWS_SSPI || CURL_LDAP_WIN) && UNICODE) */ +#endif /* USE_WIN32_IDN || (USE_WINDOWS_SSPI && UNICODE) */ -#if defined(USE_WIN32_IDN) || defined(USE_WINDOWS_SSPI) || \ - defined(CURL_LDAP_WIN) +#if defined(USE_WIN32_IDN) || defined(USE_WINDOWS_SSPI) /* * Macros Curl_convert_UTF8_to_tchar(), Curl_convert_tchar_to_UTF8() @@ -87,6 +85,6 @@ typedef union { #endif /* UNICODE */ -#endif /* USE_WIN32_IDN || USE_WINDOWS_SSPI || CURL_LDAP_WIN */ +#endif /* USE_WIN32_IDN || USE_WINDOWS_SSPI */ #endif /* HEADER_CURL_MULTIBYTE_H */ diff --git a/lib/curl_ntlm.c b/lib/curl_ntlm.c index c77f055..8c02aba 100644 --- a/lib/curl_ntlm.c +++ b/lib/curl_ntlm.c @@ -22,7 +22,7 @@ #include "curl_setup.h" -#if !defined(CURL_DISABLE_HTTP) && defined(USE_NTLM) +#ifdef USE_NTLM /* * NTLM details: @@ -39,7 +39,6 @@ #include "curl_ntlm.h" #include "curl_ntlm_msgs.h" #include "curl_ntlm_wb.h" -#include "curl_sasl.h" #include "url.h" #include "curl_memory.h" @@ -70,6 +69,12 @@ CURLcode Curl_input_ntlm(struct connectdata *conn, struct ntlmdata *ntlm; CURLcode result = CURLE_OK; +#ifdef USE_NSS + result = Curl_nss_force_init(conn->data); + if(result) + return result; +#endif + ntlm = proxy ? &conn->proxyntlm : &conn->ntlm; if(checkprefix("NTLM", header)) { @@ -79,8 +84,8 @@ CURLcode Curl_input_ntlm(struct connectdata *conn, header++; if(*header) { - result = Curl_sasl_decode_ntlm_type2_message(conn->data, header, ntlm); - if(result) + result = Curl_ntlm_decode_type2_message(conn->data, header, ntlm); + if(CURLE_OK != result) return result; ntlm->state = NTLMSTATE_TYPE2; /* We got a type-2 message */ @@ -107,11 +112,12 @@ CURLcode Curl_input_ntlm(struct connectdata *conn, /* * This is for creating ntlm header output */ -CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy) +CURLcode Curl_output_ntlm(struct connectdata *conn, + bool proxy) { char *base64 = NULL; size_t len = 0; - CURLcode result; + CURLcode error; /* point to the address of the pointer that holds the string to send to the server, which is for a plain host or for a HTTP proxy */ @@ -169,10 +175,10 @@ 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_sasl_create_ntlm_type1_message(userp, passwdp, ntlm, &base64, - &len); - if(result) - return result; + error = Curl_ntlm_create_type1_message(userp, passwdp, ntlm, &base64, + &len); + if(error) + return error; if(base64) { Curl_safefree(*allocuserpwd); @@ -182,17 +188,16 @@ CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy) free(base64); if(!*allocuserpwd) return CURLE_OUT_OF_MEMORY; - DEBUG_OUT(fprintf(stderr, "**** Header %s\n ", *allocuserpwd)); } break; case NTLMSTATE_TYPE2: /* We already received the type-2 message, create a type-3 message */ - result = Curl_sasl_create_ntlm_type3_message(conn->data, userp, passwdp, - ntlm, &base64, &len); - if(result) - return result; + error = Curl_ntlm_create_type3_message(conn->data, userp, passwdp, + ntlm, &base64, &len); + if(error) + return error; if(base64) { Curl_safefree(*allocuserpwd); @@ -202,7 +207,6 @@ CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy) free(base64); if(!*allocuserpwd) return CURLE_OUT_OF_MEMORY; - DEBUG_OUT(fprintf(stderr, "**** %s\n ", *allocuserpwd)); ntlm->state = NTLMSTATE_TYPE3; /* we send a type-3 */ @@ -223,12 +227,22 @@ CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy) void Curl_http_ntlm_cleanup(struct connectdata *conn) { - Curl_sasl_ntlm_cleanup(&conn->ntlm); - Curl_sasl_ntlm_cleanup(&conn->proxyntlm); - -#if defined(NTLM_WB_ENABLED) +#ifdef USE_WINDOWS_SSPI + Curl_ntlm_sspi_cleanup(&conn->ntlm); + Curl_ntlm_sspi_cleanup(&conn->proxyntlm); +#elif defined(NTLM_WB_ENABLED) Curl_ntlm_wb_cleanup(conn); +#else + (void)conn; +#endif + +#ifndef USE_WINDOWS_SSPI + Curl_safefree(conn->ntlm.target_info); + conn->ntlm.target_info_len = 0; + + Curl_safefree(conn->proxyntlm.target_info); + conn->proxyntlm.target_info_len = 0; #endif } -#endif /* !CURL_DISABLE_HTTP && USE_NTLM */ +#endif /* USE_NTLM */ diff --git a/lib/curl_ntlm.h b/lib/curl_ntlm.h index 947eac2..21a9e9e 100644 --- a/lib/curl_ntlm.h +++ b/lib/curl_ntlm.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2011, Daniel Stenberg, , 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,7 +24,7 @@ #include "curl_setup.h" -#if !defined(CURL_DISABLE_HTTP) && defined(USE_NTLM) +#ifdef USE_NTLM /* this is for ntlm header input */ CURLcode Curl_input_ntlm(struct connectdata *conn, bool proxy, @@ -35,6 +35,10 @@ CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy); void Curl_http_ntlm_cleanup(struct connectdata *conn); -#endif /* !CURL_DISABLE_HTTP && USE_NTLM */ +#else + +#define Curl_http_ntlm_cleanup(a) Curl_nop_stmt + +#endif #endif /* HEADER_CURL_NTLM_H */ diff --git a/lib/curl_ntlm_core.c b/lib/curl_ntlm_core.c index 2aaea4d..b011626 100644 --- a/lib/curl_ntlm_core.c +++ b/lib/curl_ntlm_core.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * 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 @@ -22,7 +22,7 @@ #include "curl_setup.h" -#if defined(USE_NTLM) +#if defined(USE_NTLM) && !defined(USE_WINDOWS_SSPI) /* * NTLM details: @@ -31,8 +31,6 @@ * http://www.innovation.ch/java/ntlm.html */ -#if !defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO) - #ifdef USE_SSLEAY # ifdef USE_OPENSSL @@ -89,11 +87,6 @@ # include # include -#elif defined(USE_OS400CRYPTO) -# include "cipher.mih" /* mih/cipher */ -# include "curl_md4.h" -#elif defined(USE_WIN32_CRYPTO) -# include #else # error "Can't compile NTLM support without a crypto library." #endif @@ -106,7 +99,6 @@ #include "curl_md5.h" #include "curl_hmac.h" #include "warnless.h" -#include "curl_endian.h" #define _MPRINTF_REPLACE /* use our functions only */ #include @@ -118,11 +110,16 @@ #define NTLMv2_BLOB_SIGNATURE "\x01\x01\x00\x00" #define NTLMv2_BLOB_LEN (44 -16 + ntlm->target_info_len + 4) +#ifdef USE_SSLEAY /* -* Turns a 56-bit key into being 64-bit wide. -*/ -static void extend_key_56_to_64(const unsigned char *key_56, char *key) + * Turns a 56 bit key into the 64 bit, odd parity key and sets the key. The + * key schedule ks is also set. + */ +static void setup_des_key(const unsigned char *key_56, + DES_key_schedule DESKEYARG(ks)) { + DES_cblock key; + key[0] = key_56[0]; key[1] = (unsigned char)(((key_56[0] << 7) & 0xFF) | (key_56[1] >> 1)); key[2] = (unsigned char)(((key_56[1] << 6) & 0xFF) | (key_56[2] >> 2)); @@ -131,24 +128,29 @@ static void extend_key_56_to_64(const unsigned char *key_56, char *key) key[5] = (unsigned char)(((key_56[4] << 3) & 0xFF) | (key_56[5] >> 5)); key[6] = (unsigned char)(((key_56[5] << 2) & 0xFF) | (key_56[6] >> 6)); key[7] = (unsigned char) ((key_56[6] << 1) & 0xFF); + + DES_set_odd_parity(&key); + DES_set_key(&key, ks); } -#ifdef USE_SSLEAY +#else /* defined(USE_SSLEAY) */ + /* - * Turns a 56 bit key into the 64 bit, odd parity key and sets the key. The - * key schedule ks is also set. + * Turns a 56 bit key into the 64 bit, odd parity key. Used by GnuTLS and NSS. */ -static void setup_des_key(const unsigned char *key_56, - DES_key_schedule DESKEYARG(ks)) +static void extend_key_56_to_64(const unsigned char *key_56, char *key) { - DES_cblock key; - - extend_key_56_to_64(key_56, (char *) key); - DES_set_odd_parity(&key); - DES_set_key(&key, ks); + key[0] = key_56[0]; + key[1] = (unsigned char)(((key_56[0] << 7) & 0xFF) | (key_56[1] >> 1)); + key[2] = (unsigned char)(((key_56[1] << 6) & 0xFF) | (key_56[2] >> 2)); + key[3] = (unsigned char)(((key_56[2] << 5) & 0xFF) | (key_56[3] >> 3)); + key[4] = (unsigned char)(((key_56[3] << 4) & 0xFF) | (key_56[4] >> 4)); + key[5] = (unsigned char)(((key_56[4] << 3) & 0xFF) | (key_56[5] >> 5)); + key[6] = (unsigned char)(((key_56[5] << 2) & 0xFF) | (key_56[6] >> 6)); + key[7] = (unsigned char) ((key_56[6] << 1) & 0xFF); } -#elif defined(USE_GNUTLS_NETTLE) +#if defined(USE_GNUTLS_NETTLE) static void setup_des_key(const unsigned char *key_56, struct des_ctx *des) @@ -247,66 +249,9 @@ static bool encrypt_des(const unsigned char *in, unsigned char *out, return err == kCCSuccess; } -#elif defined(USE_OS400CRYPTO) - -static bool encrypt_des(const unsigned char *in, unsigned char *out, - const unsigned char *key_56) -{ - char key[8]; - _CIPHER_Control_T ctl; +#endif /* defined(USE_DARWINSSL) */ - ctl.Func_ID = ENCRYPT_ONLY; - ctl.Data_Len = 8; - extend_key_56_to_64(key_56, ctl.Crypto_Key); - _CIPHER((_SPCPTR *) &out, &ctl, (_SPCPTR *) &in); - return TRUE; -} - -#elif defined(USE_WIN32_CRYPTO) - -static bool encrypt_des(const unsigned char *in, unsigned char *out, - const unsigned char *key_56) -{ - HCRYPTPROV hprov; - HCRYPTKEY hkey; - struct { - BLOBHEADER hdr; - unsigned int len; - char key[8]; - } blob; - DWORD len = 8; - - /* Acquire the crypto provider */ - if(!CryptAcquireContext(&hprov, NULL, NULL, PROV_RSA_FULL, - CRYPT_VERIFYCONTEXT)) - return FALSE; - - memset(&blob, 0, sizeof(blob)); - extend_key_56_to_64(key_56, blob.key); - blob.hdr.bType = PLAINTEXTKEYBLOB; - blob.hdr.bVersion = 2; - blob.hdr.aiKeyAlg = CALG_DES; - blob.len = sizeof(blob.key); - - /* Import the key */ - if(!CryptImportKey(hprov, (BYTE *) &blob, sizeof(blob), 0, 0, &hkey)) { - CryptReleaseContext(hprov, 0); - - return FALSE; - } - - memcpy(out, in, 8); - - /* Perform the encryption */ - CryptEncrypt(hkey, 0, FALSE, 0, out, &len, len); - - CryptDestroyKey(hkey); - CryptReleaseContext(hprov, 0); - - return TRUE; -} - -#endif /* defined(USE_WIN32_CRYPTO) */ +#endif /* defined(USE_SSLEAY) */ /* * takes a 21 byte array and treats it as 3 56-bit DES keys. The @@ -356,8 +301,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_NSS) || defined(USE_DARWINSSL) || defined(USE_OS400CRYPTO) \ - || defined(USE_WIN32_CRYPTO) +#elif defined(USE_NSS) || defined(USE_DARWINSSL) encrypt_des(plaintext, results, keys); encrypt_des(plaintext, results + 8, keys + 7); encrypt_des(plaintext, results + 16, keys + 14); @@ -367,11 +311,11 @@ void Curl_ntlm_core_lm_resp(const unsigned char *keys, /* * Set up lanmanager hashed password */ -CURLcode Curl_ntlm_core_mk_lm_hash(struct SessionHandle *data, - const char *password, - unsigned char *lmbuffer /* 21 bytes */) +void Curl_ntlm_core_mk_lm_hash(struct SessionHandle *data, + const char *password, + unsigned char *lmbuffer /* 21 bytes */) { - CURLcode result; + CURLcode res; unsigned char pw[14]; static const unsigned char magic[] = { 0x4B, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25 /* i.e. KGS!@#$% */ @@ -385,9 +329,9 @@ CURLcode Curl_ntlm_core_mk_lm_hash(struct SessionHandle *data, * The LanManager hashed password needs to be created using the * password in the network encoding not the host encoding. */ - result = Curl_convert_to_network(data, (char *)pw, 14); - if(result) - return result; + res = Curl_convert_to_network(data, (char *)pw, 14); + if(res) + return; { /* Create LanManager hashed password. */ @@ -420,16 +364,13 @@ CURLcode Curl_ntlm_core_mk_lm_hash(struct SessionHandle *data, setup_des_key(pw + 7, &des); gcry_cipher_encrypt(des, lmbuffer + 8, 8, magic, 8); gcry_cipher_close(des); -#elif defined(USE_NSS) || defined(USE_DARWINSSL) || defined(USE_OS400CRYPTO) \ - || defined(USE_WIN32_CRYPTO) +#elif defined(USE_NSS) || defined(USE_DARWINSSL) encrypt_des(magic, lmbuffer, pw); encrypt_des(magic, lmbuffer + 8, pw + 7); #endif memset(lmbuffer + 16, 0, 21 - 16); } - - return CURLE_OK; } #if USE_NTRESPONSES @@ -443,8 +384,6 @@ static void ascii_to_unicode_le(unsigned char *dest, const char *src, } } -#if USE_NTLM_V2 && !defined(USE_WINDOWS_SSPI) - static void ascii_uppercase_to_unicode_le(unsigned char *dest, const char *src, size_t srclen) { @@ -455,7 +394,23 @@ static void ascii_uppercase_to_unicode_le(unsigned char *dest, } } -#endif /* USE_NTLM_V2 && !USE_WINDOWS_SSPI */ +static void write32_le(const int value, unsigned char *buffer) +{ + buffer[0] = (char)(value & 0x000000FF); + buffer[1] = (char)((value & 0x0000FF00) >> 8); + buffer[2] = (char)((value & 0x00FF0000) >> 16); + buffer[3] = (char)((value & 0xFF000000) >> 24); +} + +#if defined(HAVE_LONGLONG) +static void write64_le(const long long value, unsigned char *buffer) +#else +static void write64_le(const __int64 value, unsigned char *buffer) +#endif +{ + write32_le((int)value, buffer); + write32_le((int)(value >> 32), buffer + 4); +} /* * Set up nt hashed passwords @@ -498,23 +453,10 @@ CURLcode Curl_ntlm_core_mk_nt_hash(struct SessionHandle *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) || defined(USE_OS400CRYPTO) +#elif defined(USE_NSS) Curl_md4it(ntbuffer, pw, 2 * len); #elif defined(USE_DARWINSSL) (void)CC_MD4(pw, (CC_LONG)(2 * len), ntbuffer); -#elif defined(USE_WIN32_CRYPTO) - HCRYPTPROV hprov; - if(CryptAcquireContext(&hprov, NULL, NULL, PROV_RSA_FULL, - CRYPT_VERIFYCONTEXT)) { - HCRYPTHASH hhash; - if(CryptCreateHash(hprov, CALG_MD4, 0, 0, &hhash)) { - DWORD length = 16; - CryptHashData(hhash, pw, (unsigned int)len * 2, 0); - CryptGetHashParam(hhash, HP_HASHVAL, ntbuffer, &length, 0); - CryptDestroyHash(hhash); - } - CryptReleaseContext(hprov, 0); - } #endif memset(ntbuffer + 16, 0, 21 - 16); @@ -525,8 +467,6 @@ CURLcode Curl_ntlm_core_mk_nt_hash(struct SessionHandle *data, return CURLE_OK; } -#if USE_NTLM_V2 && !defined(USE_WINDOWS_SSPI) - /* This returns the HMAC MD5 digest */ CURLcode Curl_hmac_md5(const unsigned char *key, unsigned int keylen, const unsigned char *data, unsigned int datalen, @@ -557,7 +497,7 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_hash(const char *user, size_t userlen, /* Unicode representation */ size_t identity_len = (userlen + domlen) * 2; unsigned char *identity = malloc(identity_len); - CURLcode result = CURLE_OK; + CURLcode res = CURLE_OK; if(!identity) return CURLE_OUT_OF_MEMORY; @@ -565,12 +505,12 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_hash(const char *user, size_t userlen, ascii_uppercase_to_unicode_le(identity, user, userlen); ascii_to_unicode_le(identity + (userlen << 1), domain, domlen); - result = Curl_hmac_md5(ntlmhash, 16, identity, curlx_uztoui(identity_len), - ntlmv2hash); + res = Curl_hmac_md5(ntlmhash, 16, identity, curlx_uztoui(identity_len), + ntlmv2hash); Curl_safefree(identity); - return result; + return res; } /* @@ -619,7 +559,7 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_resp(unsigned char *ntlmv2hash, #else __int64 tw; #endif - CURLcode result = CURLE_OK; + CURLcode res = CURLE_OK; /* Calculate the timestamp */ #ifdef DEBUGBUILD @@ -646,18 +586,17 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_resp(unsigned char *ntlmv2hash, "%c%c%c%c", /* Reserved = 0 */ 0, 0, 0, 0); - Curl_write64_le(tw, ptr + 24); + write64_le(tw, ptr + 24); memcpy(ptr + 32, challenge_client, 8); memcpy(ptr + 44, ntlm->target_info, ntlm->target_info_len); /* Concatenate the Type 2 challenge with the BLOB and do HMAC MD5 */ memcpy(ptr + 8, &ntlm->nonce[0], 8); - result = Curl_hmac_md5(ntlmv2hash, NTLM_HMAC_MD5_LEN, ptr + 8, - NTLMv2_BLOB_LEN + 8, hmac_output); - if(result) { + res = Curl_hmac_md5(ntlmv2hash, NTLM_HMAC_MD5_LEN, ptr + 8, + NTLMv2_BLOB_LEN + 8, hmac_output); + if(res) { Curl_safefree(ptr); - - return result; + return res; } /* Concatenate the HMAC MD5 output with the BLOB */ @@ -667,7 +606,7 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_resp(unsigned char *ntlmv2hash, *ntresp = ptr; *ntresp_len = len; - return result; + return res; } /* @@ -691,26 +630,22 @@ CURLcode Curl_ntlm_core_mk_lmv2_resp(unsigned char *ntlmv2hash, { unsigned char data[16]; unsigned char hmac_output[16]; - CURLcode result = CURLE_OK; + CURLcode res = CURLE_OK; memcpy(&data[0], challenge_server, 8); memcpy(&data[8], challenge_client, 8); - result = Curl_hmac_md5(ntlmv2hash, 16, &data[0], 16, hmac_output); - if(result) - return result; + res = Curl_hmac_md5(ntlmv2hash, 16, &data[0], 16, hmac_output); + if(res) + return res; /* Concatenate the HMAC MD5 output with the client nonce */ memcpy(lmresp, hmac_output, 16); memcpy(lmresp+16, challenge_client, 8); - return result; + return res; } -#endif /* USE_NTLM_V2 && !USE_WINDOWS_SSPI */ - #endif /* USE_NTRESPONSES */ -#endif /* !USE_WINDOWS_SSPI || USE_WIN32_CRYPTO */ - -#endif /* USE_NTLM */ +#endif /* USE_NTLM && !USE_WINDOWS_SSPI */ diff --git a/lib/curl_ntlm_core.h b/lib/curl_ntlm_core.h index c168966..fe41cdd 100644 --- a/lib/curl_ntlm_core.h +++ b/lib/curl_ntlm_core.h @@ -24,9 +24,7 @@ #include "curl_setup.h" -#if defined(USE_NTLM) - -#if !defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO) +#if defined(USE_NTLM) && !defined(USE_WINDOWS_SSPI) #ifdef USE_SSLEAY # if !defined(OPENSSL_VERSION_NUMBER) && \ @@ -36,49 +34,38 @@ # ifdef OPENSSL_NO_MD4 # define USE_NTRESPONSES 0 # define USE_NTLM2SESSION 0 -# define USE_NTLM_V2 0 # endif #endif -/* Define USE_NTRESPONSES to 1 in order to make the type-3 message include - * the NT response message. */ -#ifndef USE_NTRESPONSES -#define USE_NTRESPONSES 1 -#endif - -/* Define USE_NTLM2SESSION to 1 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 -#endif +/* + * Define USE_NTRESPONSES to 1 in order to make the type-3 message include + * the NT response message. Define USE_NTLM2SESSION to 1 in order to make + * the type-3 message include the NTLM2Session response message, requires + * USE_NTRESPONSES defined to 1. + */ -/* Define USE_NTLM_V2 to 1 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 +#ifndef USE_NTRESPONSES +# define USE_NTRESPONSES 1 +# define USE_NTLM2SESSION 1 #endif void Curl_ntlm_core_lm_resp(const unsigned char *keys, const unsigned char *plaintext, unsigned char *results); -CURLcode Curl_ntlm_core_mk_lm_hash(struct SessionHandle *data, - const char *password, - unsigned char *lmbuffer /* 21 bytes */); +void Curl_ntlm_core_mk_lm_hash(struct SessionHandle *data, + const char *password, + unsigned char *lmbuffer /* 21 bytes */); #if USE_NTRESPONSES -CURLcode Curl_ntlm_core_mk_nt_hash(struct SessionHandle *data, - const char *password, - unsigned char *ntbuffer /* 21 bytes */); - -#if 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, unsigned char *output); +CURLcode Curl_ntlm_core_mk_nt_hash(struct SessionHandle *data, + const char *password, + unsigned char *ntbuffer /* 21 bytes */); + CURLcode Curl_ntlm_core_mk_ntlmv2_hash(const char *user, size_t userlen, const char *domain, size_t domlen, unsigned char *ntlmhash, @@ -95,12 +82,8 @@ CURLcode Curl_ntlm_core_mk_lmv2_resp(unsigned char *ntlmv2hash, unsigned char *challenge_server, unsigned char *lmresp); -#endif /* USE_NTLM_V2 && !USE_WINDOWS_SSPI */ - -#endif /* USE_NTRESPONSES */ - -#endif /* !USE_WINDOWS_SSPI || USE_WIN32_CRYPTO */ +#endif -#endif /* USE_NTLM */ +#endif /* USE_NTLM && !USE_WINDOWS_SSPI */ #endif /* HEADER_CURL_NTLM_CORE_H */ diff --git a/lib/curl_ntlm_msgs.c b/lib/curl_ntlm_msgs.c index 865954d..42bab2e 100644 --- a/lib/curl_ntlm_msgs.c +++ b/lib/curl_ntlm_msgs.c @@ -22,7 +22,7 @@ #include "curl_setup.h" -#if defined(USE_NTLM) && !defined(USE_WINDOWS_SSPI) +#ifdef USE_NTLM /* * NTLM details: @@ -43,16 +43,14 @@ #include "warnless.h" #include "curl_memory.h" -#include "vtls/vtls.h" - -#ifdef USE_NSS -#include "vtls/nssg.h" /* for Curl_nss_force_init() */ +#ifdef USE_WINDOWS_SSPI +# include "curl_sspi.h" #endif +#include "vtls/vtls.h" + #define BUILDING_CURL_NTLM_MSGS_C #include "curl_ntlm_msgs.h" -#include "curl_sasl.h" -#include "curl_endian.h" #define _MPRINTF_REPLACE /* use our functions only */ #include @@ -149,38 +147,63 @@ static void ntlm_print_hex(FILE *handle, const char *buf, size_t len) # define DEBUG_OUT(x) Curl_nop_stmt #endif +#ifndef USE_WINDOWS_SSPI +/* + * This function converts from the little endian format used in the + * incoming package to whatever endian format we're using natively. + * Argument is a pointer to a 4 byte buffer. + */ +static unsigned int readint_le(unsigned char *buf) +{ + return ((unsigned int)buf[0]) | ((unsigned int)buf[1] << 8) | + ((unsigned int)buf[2] << 16) | ((unsigned int)buf[3] << 24); +} + /* - * ntlm_decode_type2_target() + * This function converts from the little endian format used in the incoming + * package to whatever endian format we're using natively. Argument is a + * pointer to a 2 byte buffer. + */ +static unsigned int readshort_le(unsigned char *buf) +{ + return ((unsigned int)buf[0]) | ((unsigned int)buf[1] << 8); +} + +/* + * Curl_ntlm_decode_type2_target() * * This is used to decode the "target info" in the ntlm type-2 message * received. * * Parameters: * - * data [in] - The session handle. - * buffer [in] - The decoded type-2 message. - * size [in] - The input buffer size, at least 32 bytes. - * ntlm [in/out] - The ntlm data struct being used and modified. + * data [in] - Pointer to the session handle + * buffer [in] - The decoded base64 ntlm header of Type 2 + * size [in] - The input buffer size, atleast 32 bytes + * ntlm [in] - Pointer to ntlm data struct being used and modified. * * Returns CURLE_OK on success. */ -static CURLcode ntlm_decode_type2_target(struct SessionHandle *data, - unsigned char *buffer, - size_t size, - struct ntlmdata *ntlm) +CURLcode Curl_ntlm_decode_type2_target(struct SessionHandle *data, + unsigned char *buffer, + size_t size, + struct ntlmdata *ntlm) { - unsigned short target_info_len = 0; + unsigned int target_info_len = 0; unsigned int target_info_offset = 0; + Curl_safefree(ntlm->target_info); + ntlm->target_info_len = 0; + if(size >= 48) { - target_info_len = Curl_read16_le(&buffer[40]); - target_info_offset = Curl_read32_le(&buffer[44]); + target_info_len = readshort_le(&buffer[40]); + target_info_offset = readint_le(&buffer[44]); if(target_info_len > 0) { if(((target_info_offset + target_info_len) > size) || (target_info_offset < 48)) { infof(data, "NTLM handshake failure (bad type-2 message). " "Target Info Offset Len is set incorrect by the peer\n"); - return CURLE_BAD_CONTENT_ENCODING; + return CURLE_REMOTE_ACCESS_DENIED; } ntlm->target_info = malloc(target_info_len); @@ -188,14 +211,17 @@ static CURLcode ntlm_decode_type2_target(struct SessionHandle *data, return CURLE_OUT_OF_MEMORY; memcpy(ntlm->target_info, &buffer[target_info_offset], target_info_len); + ntlm->target_info_len = target_info_len; + } - } - ntlm->target_info_len = target_info_len; + } return CURLE_OK; } +#endif + /* NTLM message structure notes: @@ -213,26 +239,29 @@ static CURLcode ntlm_decode_type2_target(struct SessionHandle *data, */ /* - * Curl_sasl_decode_ntlm_type2_message() + * Curl_ntlm_decode_type2_message() * - * This is used to decode an already encoded NTLM type-2 message. The message - * is first decoded from a base64 string into a raw NTLM message and checked - * for validity before the appropriate data for creating a type-3 message is - * written to the given NTLM data structure. + * This is used to decode a ntlm type-2 message received from a HTTP or SASL + * based (such as SMTP, POP3 or IMAP) server. The message is first decoded + * from a base64 string into a raw ntlm message and checked for validity + * before the appropriate data for creating a type-3 message is written to + * the given ntlm data structure. * * Parameters: * - * data [in] - The session handle. - * type2msg [in] - The base64 encoded type-2 message. - * ntlm [in/out] - The ntlm data struct being used and modified. + * data [in] - Pointer to session handle. + * header [in] - Pointer to the input buffer. + * ntlm [in] - Pointer to ntlm data struct being used and modified. * * Returns CURLE_OK on success. */ -CURLcode Curl_sasl_decode_ntlm_type2_message(struct SessionHandle *data, - const char *type2msg, - struct ntlmdata *ntlm) +CURLcode Curl_ntlm_decode_type2_message(struct SessionHandle *data, + const char *header, + struct ntlmdata *ntlm) { +#ifndef USE_WINDOWS_SSPI static const char type2_marker[] = { 0x02, 0x00, 0x00, 0x00 }; +#endif /* NTLM type-2 message structure: @@ -250,52 +279,52 @@ CURLcode Curl_sasl_decode_ntlm_type2_message(struct SessionHandle *data, (*) -> Optional */ - CURLcode result = CURLE_OK; - unsigned char *type2 = NULL; - size_t type2_len = 0; + size_t size = 0; + unsigned char *buffer = NULL; + CURLcode error; -#if defined(USE_NSS) - /* Make sure the crypto backend is initialized */ - result = Curl_nss_force_init(data); - if(result) - return result; -#elif defined(CURL_DISABLE_VERBOSE_STRINGS) +#if defined(CURL_DISABLE_VERBOSE_STRINGS) || defined(USE_WINDOWS_SSPI) (void)data; #endif - /* Decode the base-64 encoded type-2 message */ - if(strlen(type2msg) && *type2msg != '=') { - result = Curl_base64_decode(type2msg, &type2, &type2_len); - if(result) - return result; - } + error = Curl_base64_decode(header, &buffer, &size); + if(error) + return error; - /* Ensure we have a valid type-2 message */ - if(!type2) { - infof(data, "NTLM handshake failure (empty type-2 message)\n"); - return CURLE_BAD_CONTENT_ENCODING; + if(!buffer) { + infof(data, "NTLM handshake failure (unhandled condition)\n"); + return CURLE_REMOTE_ACCESS_DENIED; } +#ifdef USE_WINDOWS_SSPI + ntlm->type_2 = malloc(size + 1); + if(ntlm->type_2 == NULL) { + free(buffer); + return CURLE_OUT_OF_MEMORY; + } + ntlm->n_type_2 = curlx_uztoul(size); + memcpy(ntlm->type_2, buffer, size); +#else ntlm->flags = 0; - if((type2_len < 32) || - (memcmp(type2, NTLMSSP_SIGNATURE, 8) != 0) || - (memcmp(type2 + 8, type2_marker, sizeof(type2_marker)) != 0)) { + if((size < 32) || + (memcmp(buffer, NTLMSSP_SIGNATURE, 8) != 0) || + (memcmp(buffer + 8, type2_marker, sizeof(type2_marker)) != 0)) { /* This was not a good enough type-2 message */ - free(type2); + free(buffer); infof(data, "NTLM handshake failure (bad type-2 message)\n"); - return CURLE_BAD_CONTENT_ENCODING; + return CURLE_REMOTE_ACCESS_DENIED; } - ntlm->flags = Curl_read32_le(&type2[20]); - memcpy(ntlm->nonce, &type2[24], 8); + ntlm->flags = readint_le(&buffer[20]); + memcpy(ntlm->nonce, &buffer[24], 8); if(ntlm->flags & NTLMFLAG_NEGOTIATE_TARGET_INFO) { - result = ntlm_decode_type2_target(data, type2, type2_len, ntlm); - if(result) { - free(type2); + error = Curl_ntlm_decode_type2_target(data, buffer, size, ntlm); + if(error) { + free(buffer); infof(data, "NTLM handshake failure (bad type-2 message)\n"); - return result; + return error; } } @@ -307,12 +336,29 @@ CURLcode Curl_sasl_decode_ntlm_type2_message(struct SessionHandle *data, fprintf(stderr, "\n****\n"); fprintf(stderr, "**** Header %s\n ", header); }); +#endif + free(buffer); - free(type2); + return CURLE_OK; +} + +#ifdef USE_WINDOWS_SSPI +void Curl_ntlm_sspi_cleanup(struct ntlmdata *ntlm) +{ + Curl_safefree(ntlm->type_2); + + if(ntlm->has_handles) { + s_pSecFn->DeleteSecurityContext(&ntlm->c_handle); + s_pSecFn->FreeCredentialsHandle(&ntlm->handle); + ntlm->has_handles = 0; + } - return result; + Curl_sspi_free_identity(ntlm->p_identity); + ntlm->p_identity = NULL; } +#endif +#ifndef USE_WINDOWS_SSPI /* copy the source to the destination and fill in zeroes in every other destination byte! */ static void unicodecpy(unsigned char *dest, const char *src, size_t length) @@ -323,12 +369,14 @@ static void unicodecpy(unsigned char *dest, const char *src, size_t length) dest[2 * i + 1] = '\0'; } } +#endif /* - * Curl_sasl_create_ntlm_type1_message() + * Curl_ntlm_create_type1_message() * * This is used to generate an already encoded NTLM type-1 message ready for - * sending to the recipient using the appropriate compile time crypto API. + * sending to the recipient, be it a HTTP or SASL based (such as SMTP, POP3 + * or IMAP) server, using the appropriate compile time crypo API. * * Parameters: * @@ -341,10 +389,11 @@ static void unicodecpy(unsigned char *dest, const char *src, size_t length) * * Returns CURLE_OK on success. */ -CURLcode Curl_sasl_create_ntlm_type1_message(const char *userp, - const char *passwdp, - struct ntlmdata *ntlm, - char **outptr, size_t *outlen) +CURLcode Curl_ntlm_create_type1_message(const char *userp, + const char *passwdp, + struct ntlmdata *ntlm, + char **outptr, + size_t *outlen) { /* NTLM type-1 message structure: @@ -360,9 +409,75 @@ CURLcode Curl_sasl_create_ntlm_type1_message(const char *userp, (*) -> Optional */ + unsigned char ntlmbuf[NTLM_BUFSIZE]; size_t size; - unsigned char ntlmbuf[NTLM_BUFSIZE]; +#ifdef USE_WINDOWS_SSPI + + SecBuffer type_1_buf; + SecBufferDesc type_1_desc; + SECURITY_STATUS status; + unsigned long attrs; + TimeStamp tsDummy; /* For Windows 9x compatibility of SSPI calls */ + + Curl_ntlm_sspi_cleanup(ntlm); + + if(userp && *userp) { + CURLcode result; + + /* Populate our identity structure */ + result = Curl_create_sspi_identity(userp, passwdp, &ntlm->identity); + if(result) + return result; + + /* Allow proper cleanup of the identity structure */ + ntlm->p_identity = &ntlm->identity; + } + else + /* Use the current Windows user */ + ntlm->p_identity = NULL; + + /* Acquire our credientials handle */ + status = s_pSecFn->AcquireCredentialsHandle(NULL, + (TCHAR *) TEXT("NTLM"), + SECPKG_CRED_OUTBOUND, NULL, + ntlm->p_identity, NULL, NULL, + &ntlm->handle, &tsDummy); + if(status != SEC_E_OK) + return CURLE_OUT_OF_MEMORY; + + /* Setup the type-1 "output" security buffer */ + type_1_desc.ulVersion = SECBUFFER_VERSION; + type_1_desc.cBuffers = 1; + type_1_desc.pBuffers = &type_1_buf; + type_1_buf.cbBuffer = NTLM_BUFSIZE; + type_1_buf.BufferType = SECBUFFER_TOKEN; + type_1_buf.pvBuffer = ntlmbuf; + + /* Generate our type-1 message */ + status = s_pSecFn->InitializeSecurityContext(&ntlm->handle, NULL, + (TCHAR *) TEXT(""), + ISC_REQ_CONFIDENTIALITY | + ISC_REQ_REPLAY_DETECT | + ISC_REQ_CONNECTION, + 0, SECURITY_NETWORK_DREP, + NULL, 0, + &ntlm->c_handle, &type_1_desc, + &attrs, &tsDummy); + + if(status == SEC_I_COMPLETE_AND_CONTINUE || + status == SEC_I_CONTINUE_NEEDED) + s_pSecFn->CompleteAuthToken(&ntlm->c_handle, &type_1_desc); + else if(status != SEC_E_OK) { + s_pSecFn->FreeCredentialsHandle(&ntlm->handle); + return CURLE_RECV_ERROR; + } + + ntlm->has_handles = 1; + size = type_1_buf.cbBuffer; + +#else + const char *host = ""; /* empty */ const char *domain = ""; /* empty */ size_t hostlen = 0; @@ -372,11 +487,9 @@ CURLcode Curl_sasl_create_ntlm_type1_message(const char *userp, domain are empty */ (void)userp; (void)passwdp; + (void)ntlm; - /* Clean up any former leftovers and initialise to defaults */ - Curl_sasl_ntlm_cleanup(ntlm); - -#if USE_NTRESPONSES && USE_NTLM2SESSION +#if USE_NTLM2SESSION #define NTLM2FLAG NTLMFLAG_NEGOTIATE_NTLM2_KEY #else #define NTLM2FLAG 0 @@ -417,6 +530,8 @@ CURLcode Curl_sasl_create_ntlm_type1_message(const char *userp, /* Initial packet length */ size = 32 + hostlen + domlen; +#endif + DEBUG_OUT({ fprintf(stderr, "* TYPE1 header flags=0x%02.2x%02.2x%02.2x%02.2x " "0x%08.8x ", @@ -444,10 +559,11 @@ CURLcode Curl_sasl_create_ntlm_type1_message(const char *userp, } /* - * Curl_sasl_create_ntlm_type3_message() + * Curl_ntlm_create_type3_message() * * This is used to generate an already encoded NTLM type-3 message ready for - * sending to the recipient using the appropriate compile time crypto API. + * sending to the recipient, be it a HTTP or SASL based (such as SMTP, POP3 + * or IMAP) server, using the appropriate compile time crypo API. * * Parameters: * @@ -461,12 +577,12 @@ CURLcode Curl_sasl_create_ntlm_type1_message(const char *userp, * * Returns CURLE_OK on success. */ -CURLcode Curl_sasl_create_ntlm_type3_message(struct SessionHandle *data, - const char *userp, - const char *passwdp, - struct ntlmdata *ntlm, - char **outptr, size_t *outlen) - +CURLcode Curl_ntlm_create_type3_message(struct SessionHandle *data, + const char *userp, + const char *passwdp, + struct ntlmdata *ntlm, + char **outptr, + size_t *outlen) { /* NTLM type-3 message structure: @@ -486,9 +602,58 @@ CURLcode Curl_sasl_create_ntlm_type3_message(struct SessionHandle *data, (*) -> Optional */ - CURLcode result = CURLE_OK; - size_t size; unsigned char ntlmbuf[NTLM_BUFSIZE]; + size_t size; + +#ifdef USE_WINDOWS_SSPI + SecBuffer type_2_buf; + SecBuffer type_3_buf; + SecBufferDesc type_2_desc; + SecBufferDesc type_3_desc; + SECURITY_STATUS status; + unsigned long attrs; + TimeStamp tsDummy; /* For Windows 9x compatibility of SSPI calls */ + + (void)passwdp; + (void)userp; + (void)data; + + /* Setup the type-2 "input" security buffer */ + type_2_desc.ulVersion = SECBUFFER_VERSION; + type_2_desc.cBuffers = 1; + type_2_desc.pBuffers = &type_2_buf; + type_2_buf.BufferType = SECBUFFER_TOKEN; + type_2_buf.pvBuffer = ntlm->type_2; + type_2_buf.cbBuffer = ntlm->n_type_2; + + /* Setup the type-3 "output" security buffer */ + type_3_desc.ulVersion = SECBUFFER_VERSION; + type_3_desc.cBuffers = 1; + type_3_desc.pBuffers = &type_3_buf; + type_3_buf.BufferType = SECBUFFER_TOKEN; + type_3_buf.pvBuffer = ntlmbuf; + type_3_buf.cbBuffer = NTLM_BUFSIZE; + + /* Generate our type-3 message */ + status = s_pSecFn->InitializeSecurityContext(&ntlm->handle, + &ntlm->c_handle, + (TCHAR *) TEXT(""), + ISC_REQ_CONFIDENTIALITY | + ISC_REQ_REPLAY_DETECT | + ISC_REQ_CONNECTION, + 0, SECURITY_NETWORK_DREP, + &type_2_desc, + 0, &ntlm->c_handle, + &type_3_desc, + &attrs, &tsDummy); + if(status != SEC_E_OK) + return CURLE_RECV_ERROR; + + size = type_3_buf.cbBuffer; + + Curl_ntlm_sspi_cleanup(ntlm); + +#else int lmrespoff; unsigned char lmresp[24]; /* fixed-size */ #if USE_NTRESPONSES @@ -508,6 +673,7 @@ CURLcode Curl_sasl_create_ntlm_type3_message(struct SessionHandle *data, size_t hostlen = 0; size_t userlen = 0; size_t domlen = 0; + CURLcode res = CURLE_OK; user = strchr(userp, '\\'); if(!user) @@ -534,7 +700,7 @@ CURLcode Curl_sasl_create_ntlm_type3_message(struct SessionHandle *data, hostlen = strlen(host); } -#if USE_NTRESPONSES && USE_NTLM_V2 +#if USE_NTRESPONSES if(ntlm->target_info_len) { unsigned char ntbuffer[0x18]; unsigned int entropy[2]; @@ -543,35 +709,35 @@ CURLcode Curl_sasl_create_ntlm_type3_message(struct SessionHandle *data, entropy[0] = Curl_rand(data); entropy[1] = Curl_rand(data); - result = Curl_ntlm_core_mk_nt_hash(data, passwdp, ntbuffer); - if(result) - return result; + res = Curl_ntlm_core_mk_nt_hash(data, passwdp, ntbuffer); + if(res) + return res; - result = Curl_ntlm_core_mk_ntlmv2_hash(user, userlen, domain, domlen, - ntbuffer, ntlmv2hash); - if(result) - return result; + res = Curl_ntlm_core_mk_ntlmv2_hash(user, userlen, domain, domlen, + ntbuffer, ntlmv2hash); + if(res) + return res; /* LMv2 response */ - result = Curl_ntlm_core_mk_lmv2_resp(ntlmv2hash, - (unsigned char *)&entropy[0], - &ntlm->nonce[0], lmresp); - if(result) - return result; + res = Curl_ntlm_core_mk_lmv2_resp(ntlmv2hash, + (unsigned char *)&entropy[0], + &ntlm->nonce[0], lmresp); + if(res) + return res; /* NTLMv2 response */ - result = Curl_ntlm_core_mk_ntlmv2_resp(ntlmv2hash, - (unsigned char *)&entropy[0], - ntlm, &ntlmv2resp, &ntresplen); - if(result) - return result; + res = Curl_ntlm_core_mk_ntlmv2_resp(ntlmv2hash, + (unsigned char *)&entropy[0], + ntlm, &ntlmv2resp, &ntresplen); + if(res) + return res; ptr_ntresp = ntlmv2resp; } else #endif -#if USE_NTRESPONSES && USE_NTLM2SESSION +#if 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]; @@ -597,9 +763,9 @@ CURLcode Curl_sasl_create_ntlm_type3_message(struct SessionHandle *data, /* We shall only use the first 8 bytes of md5sum, but the des code in Curl_ntlm_core_lm_resp only encrypt the first 8 bytes */ - result = Curl_ntlm_core_mk_nt_hash(data, passwdp, ntbuffer); - if(result) - return result; + if(CURLE_OUT_OF_MEMORY == + Curl_ntlm_core_mk_nt_hash(data, passwdp, ntbuffer)) + return CURLE_OUT_OF_MEMORY; Curl_ntlm_core_lm_resp(ntbuffer, md5sum, ntresp); @@ -616,19 +782,14 @@ CURLcode Curl_sasl_create_ntlm_type3_message(struct SessionHandle *data, unsigned char lmbuffer[0x18]; #if USE_NTRESPONSES - result = Curl_ntlm_core_mk_nt_hash(data, passwdp, ntbuffer); - if(result) - return result; - + if(CURLE_OUT_OF_MEMORY == + Curl_ntlm_core_mk_nt_hash(data, passwdp, ntbuffer)) + return CURLE_OUT_OF_MEMORY; Curl_ntlm_core_lm_resp(ntbuffer, &ntlm->nonce[0], ntresp); #endif - result = Curl_ntlm_core_mk_lm_hash(data, passwdp, lmbuffer); - if(result) - return result; - + Curl_ntlm_core_mk_lm_hash(data, passwdp, lmbuffer); Curl_ntlm_core_lm_resp(lmbuffer, &ntlm->nonce[0], lmresp); - /* A safer but less compatible alternative is: * Curl_ntlm_core_lm_resp(ntbuffer, &ntlm->nonce[0], lmresp); * See http://davenport.sourceforge.net/ntlm.html#ntlmVersion2 */ @@ -803,17 +964,15 @@ CURLcode Curl_sasl_create_ntlm_type3_message(struct SessionHandle *data, size += hostlen; /* Convert domain, user, and host to ASCII but leave the rest as-is */ - result = Curl_convert_to_network(data, (char *)&ntlmbuf[domoff], - size - domoff); - if(result) + res = Curl_convert_to_network(data, (char *)&ntlmbuf[domoff], + size - domoff); + if(res) return CURLE_CONV_FAILED; - /* Return with binary blob encoded into base64 */ - result = Curl_base64_encode(NULL, (char *)ntlmbuf, size, outptr, outlen); - - Curl_sasl_ntlm_cleanup(ntlm); +#endif - return result; + /* Return with binary blob encoded into base64 */ + return Curl_base64_encode(NULL, (char *)ntlmbuf, size, outptr, outlen); } -#endif /* USE_NTLM && !USE_WINDOWS_SSPI */ +#endif /* USE_NTLM */ diff --git a/lib/curl_ntlm_msgs.h b/lib/curl_ntlm_msgs.h index 2a71431..80413c8 100644 --- a/lib/curl_ntlm_msgs.h +++ b/lib/curl_ntlm_msgs.h @@ -26,6 +26,40 @@ #ifdef USE_NTLM +/* This is to generate a base64 encoded NTLM type-1 message */ +CURLcode Curl_ntlm_create_type1_message(const char *userp, + const char *passwdp, + struct ntlmdata *ntlm, + char **outptr, + size_t *outlen); + +/* This is to generate a base64 encoded NTLM type-3 message */ +CURLcode Curl_ntlm_create_type3_message(struct SessionHandle *data, + const char *userp, + const char *passwdp, + struct ntlmdata *ntlm, + char **outptr, + size_t *outlen); + +/* This is to decode a NTLM type-2 message */ +CURLcode Curl_ntlm_decode_type2_message(struct SessionHandle *data, + const char* header, + struct ntlmdata* ntlm); + +/* This is to decode target info received in NTLM type-2 message */ +CURLcode Curl_ntlm_decode_type2_target(struct SessionHandle *data, + unsigned char* buffer, + size_t size, + struct ntlmdata* ntlm); + + +/* This is to clean up the ntlm data structure */ +#ifdef USE_WINDOWS_SSPI +void Curl_ntlm_sspi_cleanup(struct ntlmdata *ntlm); +#else +#define Curl_ntlm_sspi_cleanup(x) +#endif + /* NTLM buffer fixed size, large enough for long user + host + domain */ #define NTLM_BUFSIZE 1024 diff --git a/lib/curl_ntlm_wb.c b/lib/curl_ntlm_wb.c index 5e2d79c..57f7142 100644 --- a/lib/curl_ntlm_wb.c +++ b/lib/curl_ntlm_wb.c @@ -22,8 +22,7 @@ #include "curl_setup.h" -#if !defined(CURL_DISABLE_HTTP) && defined(USE_NTLM) && \ - defined(NTLM_WB_ENABLED) +#if defined(USE_NTLM) && defined(NTLM_WB_ENABLED) /* * NTLM details: @@ -40,9 +39,6 @@ #ifdef HAVE_SIGNAL_H #include #endif -#ifdef HAVE_PWD_H -#include -#endif #include "urldata.h" #include "sendf.h" @@ -121,10 +117,6 @@ static CURLcode ntlm_wb_init(struct connectdata *conn, const char *userp) char *slash, *domain = NULL; const char *ntlm_auth = NULL; char *ntlm_auth_alloc = NULL; -#if defined(HAVE_GETPWUID_R) && defined(HAVE_GETEUID) - struct passwd pw, *pw_res; - char pwbuf[1024]; -#endif int error; /* Return if communication with ntlm_auth already set up */ @@ -133,30 +125,6 @@ static CURLcode ntlm_wb_init(struct connectdata *conn, const char *userp) return CURLE_OK; username = userp; - /* The real ntlm_auth really doesn't like being invoked with an - empty username. It won't make inferences for itself, and expects - the client to do so (mostly because it's really designed for - servers like squid to use for auth, and client support is an - afterthought for it). So try hard to provide a suitable username - if we don't already have one. But if we can't, provide the - empty one anyway. Perhaps they have an implementation of the - ntlm_auth helper which *doesn't* need it so we might as well try */ - if(!username || !username[0]) { - username = getenv("NTLMUSER"); - if(!username || !username[0]) - username = getenv("LOGNAME"); - if(!username || !username[0]) - username = getenv("USER"); -#if defined(HAVE_GETPWUID_R) && defined(HAVE_GETEUID) - if((!username || !username[0]) && - !getpwuid_r(geteuid(), &pw, pwbuf, sizeof(pwbuf), &pw_res) && - pw_res) { - username = pw.pw_name; - } -#endif - if(!username || !username[0]) - username = userp; - } slash = strpbrk(username, "\\/"); if(slash) { if((domain = strdup(username)) == NULL) @@ -259,11 +227,11 @@ done: static CURLcode ntlm_wb_response(struct connectdata *conn, const char *input, curlntlm state) { - char *buf = malloc(NTLM_BUFSIZE); - size_t len_in = strlen(input), len_out = 0; - - if(!buf) - return CURLE_OUT_OF_MEMORY; + ssize_t size; + char buf[NTLM_BUFSIZE]; + char *tmpbuf = buf; + size_t len_in = strlen(input); + size_t len_out = sizeof(buf); while(len_in > 0) { ssize_t written = swrite(conn->ntlm_auth_hlpr_socket, input, len_in); @@ -278,11 +246,8 @@ static CURLcode ntlm_wb_response(struct connectdata *conn, len_in -= written; } /* Read one line */ - while(1) { - ssize_t size; - char *newbuf; - - size = sread(conn->ntlm_auth_hlpr_socket, buf + len_out, NTLM_BUFSIZE); + while(len_out > 0) { + size = sread(conn->ntlm_auth_hlpr_socket, tmpbuf, len_out); if(size == -1) { if(errno == EINTR) continue; @@ -290,27 +255,22 @@ static CURLcode ntlm_wb_response(struct connectdata *conn, } else if(size == 0) goto done; - - len_out += size; - if(buf[len_out - 1] == '\n') { - buf[len_out - 1] = '\0'; - break; + else if(tmpbuf[size - 1] == '\n') { + tmpbuf[size - 1] = '\0'; + goto wrfinish; } - newbuf = realloc(buf, len_out + NTLM_BUFSIZE); - if(!newbuf) { - free(buf); - return CURLE_OUT_OF_MEMORY; - } - buf = newbuf; + tmpbuf += size; + len_out -= size; } - + goto done; +wrfinish: /* Samba/winbind installed but not configured */ if(state == NTLMSTATE_TYPE1 && - len_out == 3 && + size == 3 && buf[0] == 'P' && buf[1] == 'W') return CURLE_REMOTE_ACCESS_DENIED; /* invalid response */ - if(len_out < 4) + if(size < 4) goto done; if(state == NTLMSTATE_TYPE1 && (buf[0]!='Y' || buf[1]!='R' || buf[2]!=' ')) @@ -320,11 +280,9 @@ static CURLcode ntlm_wb_response(struct connectdata *conn, (buf[0]!='A' || buf[1]!='F' || buf[2]!=' ')) goto done; - conn->response_header = aprintf("NTLM %.*s", len_out - 4, buf + 3); - free(buf); + conn->response_header = aprintf("NTLM %.*s", size - 4, buf + 3); return CURLE_OK; done: - free(buf); return CURLE_REMOTE_ACCESS_DENIED; } @@ -432,4 +390,4 @@ CURLcode Curl_output_ntlm_wb(struct connectdata *conn, return CURLE_OK; } -#endif /* !CURL_DISABLE_HTTP && USE_NTLM && NTLM_WB_ENABLED */ +#endif /* USE_NTLM && NTLM_WB_ENABLED */ diff --git a/lib/curl_ntlm_wb.h b/lib/curl_ntlm_wb.h index 828bb57..db6bc16 100644 --- a/lib/curl_ntlm_wb.h +++ b/lib/curl_ntlm_wb.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2011, Daniel Stenberg, , 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,8 +24,7 @@ #include "curl_setup.h" -#if !defined(CURL_DISABLE_HTTP) && defined(USE_NTLM) && \ - defined(NTLM_WB_ENABLED) +#if defined(USE_NTLM) && defined(NTLM_WB_ENABLED) /* this is for creating ntlm header output by delegating challenge/response to Samba's winbind daemon helper ntlm_auth */ @@ -33,6 +32,6 @@ CURLcode Curl_output_ntlm_wb(struct connectdata *conn, bool proxy); void Curl_ntlm_wb_cleanup(struct connectdata *conn); -#endif /* !CURL_DISABLE_HTTP && USE_NTLM && NTLM_WB_ENABLED */ +#endif /* USE_NTLM && NTLM_WB_ENABLED */ #endif /* HEADER_CURL_NTLM_WB_H */ diff --git a/lib/curl_rtmp.c b/lib/curl_rtmp.c index d1d79c3..e0c24b0 100644 --- a/lib/curl_rtmp.c +++ b/lib/curl_rtmp.c @@ -49,7 +49,7 @@ #define DEF_BUFTIME (2*60*60*1000) /* 2 hours */ -static CURLcode rtmp_setup_connection(struct connectdata *conn); +static CURLcode rtmp_setup(struct connectdata *conn); static CURLcode rtmp_do(struct connectdata *conn, bool *done); static CURLcode rtmp_done(struct connectdata *conn, CURLcode, bool premature); static CURLcode rtmp_connect(struct connectdata *conn, bool *done); @@ -64,7 +64,7 @@ static Curl_send rtmp_send; const struct Curl_handler Curl_handler_rtmp = { "RTMP", /* scheme */ - rtmp_setup_connection, /* setup_connection */ + rtmp_setup, /* setup_connection */ rtmp_do, /* do_it */ rtmp_done, /* done */ ZERO_NULL, /* do_more */ @@ -84,7 +84,7 @@ const struct Curl_handler Curl_handler_rtmp = { const struct Curl_handler Curl_handler_rtmpt = { "RTMPT", /* scheme */ - rtmp_setup_connection, /* setup_connection */ + rtmp_setup, /* setup_connection */ rtmp_do, /* do_it */ rtmp_done, /* done */ ZERO_NULL, /* do_more */ @@ -104,7 +104,7 @@ const struct Curl_handler Curl_handler_rtmpt = { const struct Curl_handler Curl_handler_rtmpe = { "RTMPE", /* scheme */ - rtmp_setup_connection, /* setup_connection */ + rtmp_setup, /* setup_connection */ rtmp_do, /* do_it */ rtmp_done, /* done */ ZERO_NULL, /* do_more */ @@ -124,7 +124,7 @@ const struct Curl_handler Curl_handler_rtmpe = { const struct Curl_handler Curl_handler_rtmpte = { "RTMPTE", /* scheme */ - rtmp_setup_connection, /* setup_connection */ + rtmp_setup, /* setup_connection */ rtmp_do, /* do_it */ rtmp_done, /* done */ ZERO_NULL, /* do_more */ @@ -144,7 +144,7 @@ const struct Curl_handler Curl_handler_rtmpte = { const struct Curl_handler Curl_handler_rtmps = { "RTMPS", /* scheme */ - rtmp_setup_connection, /* setup_connection */ + rtmp_setup, /* setup_connection */ rtmp_do, /* do_it */ rtmp_done, /* done */ ZERO_NULL, /* do_more */ @@ -164,7 +164,7 @@ const struct Curl_handler Curl_handler_rtmps = { const struct Curl_handler Curl_handler_rtmpts = { "RTMPTS", /* scheme */ - rtmp_setup_connection, /* setup_connection */ + rtmp_setup, /* setup_connection */ rtmp_do, /* do_it */ rtmp_done, /* done */ ZERO_NULL, /* do_more */ @@ -182,9 +182,10 @@ const struct Curl_handler Curl_handler_rtmpts = { PROTOPT_NONE /* flags*/ }; -static CURLcode rtmp_setup_connection(struct connectdata *conn) +static CURLcode rtmp_setup(struct connectdata *conn) { RTMP *r = RTMP_Alloc(); + if(!r) return CURLE_OUT_OF_MEMORY; @@ -216,7 +217,7 @@ static CURLcode rtmp_connect(struct connectdata *conn, bool *done) !(r->Link.protocol & RTMP_FEATURE_HTTP)) r->Link.lFlags |= RTMP_LF_BUFX; - (void)curlx_nonblock(r->m_sb.sb_socket, FALSE); + curlx_nonblock(r->m_sb.sb_socket, FALSE); setsockopt(r->m_sb.sb_socket, SOL_SOCKET, SO_RCVTIMEO, (char *)&tv, sizeof(tv)); diff --git a/lib/curl_sasl.c b/lib/curl_sasl.c index b944aa2..a2dfe77 100644 --- a/lib/curl_sasl.c +++ b/lib/curl_sasl.c @@ -19,7 +19,6 @@ * KIND, either express or implied. * * RFC2195 CRAM-MD5 authentication - * RFC2617 Basic and Digest Access Authentication * RFC2831 DIGEST-MD5 authentication * RFC4422 Simple Authentication and Security Layer (SASL) * RFC4616 PLAIN authentication @@ -37,12 +36,16 @@ #include "curl_md5.h" #include "vtls/vtls.h" #include "curl_hmac.h" +#include "curl_ntlm_msgs.h" #include "curl_sasl.h" #include "warnless.h" #include "curl_memory.h" #include "strtok.h" #include "rawstr.h" -#include "non-ascii.h" /* included for Curl_convert_... prototypes */ + +#ifdef USE_NSS +#include "vtls/nssg.h" /* for Curl_nss_force_init() */ +#endif #define _MPRINTF_REPLACE /* use our functions only */ #include @@ -59,129 +62,6 @@ #define DIGEST_QOP_VALUE_STRING_AUTH_INT "auth-int" #define DIGEST_QOP_VALUE_STRING_AUTH_CONF "auth-conf" -#define DIGEST_MAX_VALUE_LENGTH 256 -#define DIGEST_MAX_CONTENT_LENGTH 1024 - -/* The CURL_OUTPUT_DIGEST_CONV macro below is for non-ASCII machines. - It converts digest text to ASCII so the MD5 will be correct for - what ultimately goes over the network. -*/ -#define CURL_OUTPUT_DIGEST_CONV(a, b) \ - result = Curl_convert_to_network(a, (char *)b, strlen((const char*)b)); \ - if(result) { \ - free(b); \ - return result; \ - } - -/* - * Return 0 on success and then the buffers are filled in fine. - * - * Non-zero means failure to parse. - */ -static int sasl_digest_get_pair(const char *str, char *value, char *content, - const char **endptr) -{ - int c; - bool starts_with_quote = FALSE; - bool escape = FALSE; - - for(c = DIGEST_MAX_VALUE_LENGTH - 1; (*str && (*str != '=') && c--); ) - *value++ = *str++; - *value = 0; - - if('=' != *str++) - /* eek, no match */ - return 1; - - if('\"' == *str) { - /* this starts with a quote so it must end with one as well! */ - str++; - starts_with_quote = TRUE; - } - - for(c = DIGEST_MAX_CONTENT_LENGTH - 1; *str && c--; str++) { - switch(*str) { - case '\\': - if(!escape) { - /* possibly the start of an escaped quote */ - escape = TRUE; - *content++ = '\\'; /* even though this is an escape character, we still - store it as-is in the target buffer */ - continue; - } - break; - case ',': - if(!starts_with_quote) { - /* this signals the end of the content if we didn't get a starting - quote and then we do "sloppy" parsing */ - c = 0; /* the end */ - continue; - } - break; - case '\r': - case '\n': - /* end of string */ - c = 0; - continue; - case '\"': - if(!escape && starts_with_quote) { - /* end of string */ - c = 0; - continue; - } - break; - } - escape = FALSE; - *content++ = *str; - } - *content = 0; - - *endptr = str; - - return 0; /* all is fine! */ -} - -/* Convert md5 chunk to RFC2617 (section 3.1.3) -suitable ascii string*/ -static void sasl_digest_md5_to_ascii(unsigned char *source, /* 16 bytes */ - unsigned char *dest) /* 33 bytes */ -{ - int i; - for(i = 0; i < 16; i++) - snprintf((char *)&dest[i*2], 3, "%02x", source[i]); -} - -/* Perform quoted-string escaping as described in RFC2616 and its errata */ -static char *sasl_digest_string_quoted(const char *source) -{ - char *dest, *d; - const char *s = source; - size_t n = 1; /* null terminator */ - - /* Calculate size needed */ - while(*s) { - ++n; - if(*s == '"' || *s == '\\') { - ++n; - } - ++s; - } - - dest = malloc(n); - if(dest) { - s = source; - d = dest; - while(*s) { - if(*s == '"' || *s == '\\') { - *d++ = '\\'; - } - *d++ = *s++; - } - *d = 0; - } - - return dest; -} - /* Retrieves the value for a corresponding key from the challenge string * returns TRUE if the key could be found, FALSE if it does not exists */ @@ -238,26 +118,6 @@ static CURLcode sasl_digest_get_qop_values(const char *options, int *value) return CURLE_OK; } -#endif /* !CURL_DISABLE_CRYPTO_AUTH && !USE_WINDOWS_SSPI */ - -#if !defined(USE_WINDOWS_SSPI) -/* - * Curl_sasl_build_spn() - * - * This is used to build a SPN string in the format service/host. - * - * Parameters: - * - * serivce [in] - The service type such as www, smtp, pop or imap. - * host [in] - The host name or realm. - * - * Returns a pointer to the newly allocated SPN. - */ -char *Curl_sasl_build_spn(const char *service, const char *host) -{ - /* Generate and return our SPN */ - return aprintf("%s/%s", service, host); -} #endif /* @@ -357,7 +217,7 @@ CURLcode Curl_sasl_create_login_message(struct SessionHandle *data, * * Parameters: * - * chlg64 [in] - The base64 encoded challenge message. + * chlg64 [in] - Pointer to the base64 encoded challenge message. * 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. @@ -454,7 +314,7 @@ CURLcode Curl_sasl_create_cram_md5_message(struct SessionHandle *data, * * Parameters: * - * chlg64 [in] - The base64 encoded challenge message. + * chlg64 [in] - Pointer to the base64 encoded challenge message. * nonce [in/out] - The buffer where the nonce will be stored. * nlen [in] - The length of the nonce buffer. * realm [in/out] - The buffer where the realm will be stored. @@ -526,7 +386,7 @@ static CURLcode sasl_decode_digest_md5_message(const char *chlg64, * Parameters: * * data [in] - The session handle. - * chlg64 [in] - The base64 encoded challenge message. + * chlg64 [in] - Pointer to the base64 encoded challenge message. * userp [in] - The user name. * passdwp [in] - The user's password. * service [in] - The service type such as www, smtp, pop or imap. @@ -561,7 +421,7 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data, char nonceCount[] = "00000001"; char method[] = "AUTHENTICATE"; char qop[] = DIGEST_QOP_VALUE_STRING_AUTH; - char *spn = NULL; + char uri[128]; /* Decode the challange message */ result = sasl_decode_digest_md5_message(chlg64, nonce, sizeof(nonce), @@ -626,24 +486,19 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data, for(i = 0; i < MD5_DIGEST_LEN; i++) snprintf(&HA1_hex[2 * i], 3, "%02x", digest[i]); - /* Generate our SPN */ - spn = Curl_sasl_build_spn(service, realm); - if(!spn) - return CURLE_OUT_OF_MEMORY; + /* Prepare the URL string */ + snprintf(uri, sizeof(uri), "%s/%s", service, realm); /* Calculate H(A2) */ ctxt = Curl_MD5_init(Curl_DIGEST_MD5); - if(!ctxt) { - Curl_safefree(spn); - + if(!ctxt) return CURLE_OUT_OF_MEMORY; - } Curl_MD5_update(ctxt, (const unsigned char *) method, curlx_uztoui(strlen(method))); Curl_MD5_update(ctxt, (const unsigned char *) ":", 1); - Curl_MD5_update(ctxt, (const unsigned char *) spn, - curlx_uztoui(strlen(spn))); + Curl_MD5_update(ctxt, (const unsigned char *) uri, + curlx_uztoui(strlen(uri))); Curl_MD5_final(ctxt, digest); for(i = 0; i < MD5_DIGEST_LEN; i++) @@ -651,11 +506,8 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data, /* Now calculate the response hash */ ctxt = Curl_MD5_init(Curl_DIGEST_MD5); - if(!ctxt) { - Curl_safefree(spn); - + if(!ctxt) return CURLE_OUT_OF_MEMORY; - } Curl_MD5_update(ctxt, (const unsigned char *) HA1_hex, 2 * MD5_DIGEST_LEN); Curl_MD5_update(ctxt, (const unsigned char *) ":", 1); @@ -684,430 +536,106 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data, "cnonce=\"%s\",nc=\"%s\",digest-uri=\"%s\",response=%s," "qop=%s", userp, realm, nonce, - cnonce, nonceCount, spn, resp_hash_hex, qop); - Curl_safefree(spn); + cnonce, nonceCount, uri, resp_hash_hex, qop); if(!response) return CURLE_OUT_OF_MEMORY; /* Base64 encode the response */ result = Curl_base64_encode(data, response, 0, outptr, outlen); - Curl_safefree(response); - + free(response); return result; } +#endif /* USE_WINDOWS_SSPI */ -/* - * Curl_sasl_decode_digest_http_message() - * - * This is used to decode a HTTP DIGEST challenge message into the seperate - * attributes. - * - * Parameters: - * - * chlg [in] - The challenge message. - * digest [in/out] - The digest data struct being used and modified. - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_sasl_decode_digest_http_message(const char *chlg, - struct digestdata *digest) -{ - bool before = FALSE; /* got a nonce before */ - bool foundAuth = FALSE; - bool foundAuthInt = FALSE; - char *token = NULL; - char *tmp = NULL; - - /* If we already have received a nonce, keep that in mind */ - if(digest->nonce) - before = TRUE; - - /* Clean up any former leftovers and initialise to defaults */ - Curl_sasl_digest_cleanup(digest); - - for(;;) { - char value[DIGEST_MAX_VALUE_LENGTH]; - char content[DIGEST_MAX_CONTENT_LENGTH]; - - /* Pass all additional spaces here */ - while(*chlg && ISSPACE(*chlg)) - chlg++; - - /* Extract a value=content pair */ - if(!sasl_digest_get_pair(chlg, value, content, &chlg)) { - if(Curl_raw_equal(value, "nonce")) { - digest->nonce = strdup(content); - if(!digest->nonce) - return CURLE_OUT_OF_MEMORY; - } - else if(Curl_raw_equal(value, "stale")) { - if(Curl_raw_equal(content, "true")) { - digest->stale = TRUE; - digest->nc = 1; /* we make a new nonce now */ - } - } - else if(Curl_raw_equal(value, "realm")) { - digest->realm = strdup(content); - if(!digest->realm) - return CURLE_OUT_OF_MEMORY; - } - else if(Curl_raw_equal(value, "opaque")) { - digest->opaque = strdup(content); - if(!digest->opaque) - return CURLE_OUT_OF_MEMORY; - } - else if(Curl_raw_equal(value, "qop")) { - char *tok_buf; - /* Tokenize the list and choose auth if possible, use a temporary - clone of the buffer since strtok_r() ruins it */ - tmp = strdup(content); - if(!tmp) - return CURLE_OUT_OF_MEMORY; - - token = strtok_r(tmp, ",", &tok_buf); - while(token != NULL) { - if(Curl_raw_equal(token, DIGEST_QOP_VALUE_STRING_AUTH)) { - foundAuth = TRUE; - } - else if(Curl_raw_equal(token, DIGEST_QOP_VALUE_STRING_AUTH_INT)) { - foundAuthInt = TRUE; - } - token = strtok_r(NULL, ",", &tok_buf); - } - - free(tmp); - - /* Select only auth or auth-int. Otherwise, ignore */ - if(foundAuth) { - digest->qop = strdup(DIGEST_QOP_VALUE_STRING_AUTH); - if(!digest->qop) - return CURLE_OUT_OF_MEMORY; - } - else if(foundAuthInt) { - digest->qop = strdup(DIGEST_QOP_VALUE_STRING_AUTH_INT); - if(!digest->qop) - return CURLE_OUT_OF_MEMORY; - } - } - else if(Curl_raw_equal(value, "algorithm")) { - digest->algorithm = strdup(content); - if(!digest->algorithm) - return CURLE_OUT_OF_MEMORY; - - if(Curl_raw_equal(content, "MD5-sess")) - digest->algo = CURLDIGESTALGO_MD5SESS; - else if(Curl_raw_equal(content, "MD5")) - digest->algo = CURLDIGESTALGO_MD5; - else - return CURLE_BAD_CONTENT_ENCODING; - } - else { - /* unknown specifier, ignore it! */ - } - } - else - break; /* we're done here */ - - /* Pass all additional spaces here */ - while(*chlg && ISSPACE(*chlg)) - chlg++; - - /* Allow the list to be comma-separated */ - if(',' == *chlg) - chlg++; - } - - /* We had a nonce since before, and we got another one now without - 'stale=true'. This means we provided bad credentials in the previous - request */ - if(before && !digest->stale) - return CURLE_BAD_CONTENT_ENCODING; - - /* We got this header without a nonce, that's a bad Digest line! */ - if(!digest->nonce) - return CURLE_BAD_CONTENT_ENCODING; - - return CURLE_OK; -} +#endif /* CURL_DISABLE_CRYPTO_AUTH */ +#ifdef USE_NTLM /* - * Curl_sasl_create_digest_http_message() + * Curl_sasl_create_ntlm_type1_message() * - * This is used to generate a HTTP DIGEST response message ready for sending - * to the recipient. + * This is used to generate an already encoded NTLM type-1 message ready for + * sending to the recipient. + * + * Note: This is a simple wrapper of the NTLM function which means that any + * SASL based protocols don't have to include the NTLM functions directly. * * Parameters: * - * data [in] - The session handle. - * userp [in] - The user name. + * userp [in] - The user name in the format User or Domain\User. * 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. + * ntlm [in/out] - The ntlm 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_sasl_create_digest_http_message(struct SessionHandle *data, - const char *userp, - const char *passwdp, - const unsigned char *request, - const unsigned char *uripath, - struct digestdata *digest, - char **outptr, size_t *outlen) +CURLcode Curl_sasl_create_ntlm_type1_message(const char *userp, + const char *passwdp, + struct ntlmdata *ntlm, + char **outptr, size_t *outlen) { - 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 */ - char cnoncebuf[33]; - char *cnonce = NULL; - size_t cnonce_sz = 0; - char *userp_quoted; - char *response = NULL; - char *tmp = NULL; - - if(!digest->nc) - digest->nc = 1; - - if(!digest->cnonce) { - snprintf(cnoncebuf, sizeof(cnoncebuf), "%08x%08x%08x%08x", - Curl_rand(data), Curl_rand(data), - Curl_rand(data), Curl_rand(data)); - - result = Curl_base64_encode(data, cnoncebuf, strlen(cnoncebuf), - &cnonce, &cnonce_sz); - if(result) - return result; - - digest->cnonce = cnonce; - } - - /* - if the algorithm is "MD5" or unspecified (which then defaults to MD5): - - A1 = unq(username-value) ":" unq(realm-value) ":" passwd - - if the algorithm is "MD5-sess" then: - - A1 = H( unq(username-value) ":" unq(realm-value) ":" passwd ) - ":" unq(nonce-value) ":" unq(cnonce-value) - */ - - md5this = (unsigned char *) - aprintf("%s:%s:%s", userp, digest->realm, passwdp); - if(!md5this) - return CURLE_OUT_OF_MEMORY; - - CURL_OUTPUT_DIGEST_CONV(data, md5this); /* convert on non-ASCII machines */ - Curl_md5it(md5buf, md5this); - Curl_safefree(md5this); - sasl_digest_md5_to_ascii(md5buf, ha1); - - if(digest->algo == CURLDIGESTALGO_MD5SESS) { - /* 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); - Curl_safefree(tmp); - sasl_digest_md5_to_ascii(md5buf, ha1); - } - - /* - If the "qop" directive's value is "auth" or is unspecified, then A2 is: - - A2 = Method ":" digest-uri-value - - If the "qop" value is "auth-int", then A2 is: - - A2 = Method ":" digest-uri-value ":" H(entity-body) - - (The "Method" value is the HTTP request method as specified in section - 5.1.1 of RFC 2616) - */ - - md5this = (unsigned char *)aprintf("%s:%s", request, uripath); - - if(digest->qop && Curl_raw_equal(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"); - Curl_safefree(md5this); - md5this = md5this2; - } - - if(!md5this) - return CURLE_OUT_OF_MEMORY; - - CURL_OUTPUT_DIGEST_CONV(data, md5this); /* convert on non-ASCII machines */ - Curl_md5it(md5buf, md5this); - Curl_safefree(md5this); - sasl_digest_md5_to_ascii(md5buf, ha2); - - if(digest->qop) { - md5this = (unsigned char *)aprintf("%s:%s:%08x:%s:%s:%s", - ha1, - digest->nonce, - digest->nc, - digest->cnonce, - digest->qop, - ha2); - } - else { - md5this = (unsigned char *)aprintf("%s:%s:%s", - ha1, - digest->nonce, - ha2); - } - - if(!md5this) - return CURLE_OUT_OF_MEMORY; - - CURL_OUTPUT_DIGEST_CONV(data, md5this); /* convert on non-ASCII machines */ - Curl_md5it(md5buf, md5this); - Curl_safefree(md5this); - sasl_digest_md5_to_ascii(md5buf, request_digest); - - /* for test case 64 (snooped from a Mozilla 1.3a request) - - Authorization: Digest username="testuser", realm="testrealm", \ - nonce="1053604145", uri="/64", response="c55f7f30d83d774a3d2dcacf725abaca" - - Digest parameters are all quoted strings. Username which is provided by - the user will need double quotes and backslashes within it escaped. For - the other fields, this shouldn't be an issue. realm, nonce, and opaque - are copied as is from the server, escapes and all. cnonce is generated - with web-safe characters. uri is already percent encoded. nc is 8 hex - characters. algorithm and qop with standard values only contain web-safe - chracters. - */ - userp_quoted = sasl_digest_string_quoted(userp); - if(!userp_quoted) - return CURLE_OUT_OF_MEMORY; - - if(digest->qop) { - response = aprintf("username=\"%s\", " - "realm=\"%s\", " - "nonce=\"%s\", " - "uri=\"%s\", " - "cnonce=\"%s\", " - "nc=%08x, " - "qop=%s, " - "response=\"%s\"", - userp_quoted, - digest->realm, - digest->nonce, - uripath, - digest->cnonce, - digest->nc, - digest->qop, - request_digest); - - if(Curl_raw_equal(digest->qop, "auth")) - digest->nc++; /* The nc (from RFC) has to be a 8 hex digit number 0 - padded which tells to the server how many times you are - using the same nonce in the qop=auth mode */ - } - else { - response = aprintf("username=\"%s\", " - "realm=\"%s\", " - "nonce=\"%s\", " - "uri=\"%s\", " - "response=\"%s\"", - userp_quoted, - digest->realm, - digest->nonce, - uripath, - request_digest); - } - Curl_safefree(userp_quoted); - if(!response) - return CURLE_OUT_OF_MEMORY; - - /* Add the optional fields */ - if(digest->opaque) { - /* Append the opaque */ - tmp = aprintf("%s, opaque=\"%s\"", response, digest->opaque); - free(response); - if(!tmp) - return CURLE_OUT_OF_MEMORY; - - response = tmp; - } - - if(digest->algorithm) { - /* Append the algorithm */ - tmp = aprintf("%s, algorithm=\"%s\"", response, digest->algorithm); - free(response); - if(!tmp) - return CURLE_OUT_OF_MEMORY; - - response = tmp; - } - - /* Return the output */ - *outptr = response; - *outlen = strlen(response); - - return CURLE_OK; + return Curl_ntlm_create_type1_message(userp, passwdp, ntlm, outptr, outlen); } /* - * Curl_sasl_digest_cleanup() + * Curl_sasl_decode_ntlm_type2_message() * - * This is used to clean up the digest specific data. + * This is used to decode an already encoded NTLM type-2 message. * * Parameters: * - * digest [in/out] - The digest data struct being cleaned up. + * data [in] - Pointer to session handle. + * type2msg [in] - Pointer to the base64 encoded type-2 message. + * ntlm [in/out] - The ntlm data struct being used and modified. * + * Returns CURLE_OK on success. */ -void Curl_sasl_digest_cleanup(struct digestdata *digest) +CURLcode Curl_sasl_decode_ntlm_type2_message(struct SessionHandle *data, + const char *type2msg, + struct ntlmdata *ntlm) { - Curl_safefree(digest->nonce); - Curl_safefree(digest->cnonce); - Curl_safefree(digest->realm); - Curl_safefree(digest->opaque); - Curl_safefree(digest->qop); - Curl_safefree(digest->algorithm); - - digest->nc = 0; - digest->algo = CURLDIGESTALGO_MD5; /* default algorithm */ - digest->stale = FALSE; /* default means normal, not stale */ -} -#endif /* !USE_WINDOWS_SSPI */ +#ifdef USE_NSS + CURLcode result; -#endif /* CURL_DISABLE_CRYPTO_AUTH */ + /* make sure the crypto backend is initialized */ + result = Curl_nss_force_init(data); + if(result) + return result; +#endif + + return Curl_ntlm_decode_type2_message(data, type2msg, ntlm); +} -#if defined(USE_NTLM) && !defined(USE_WINDOWS_SSPI) /* - * Curl_sasl_ntlm_cleanup() + * Curl_sasl_create_ntlm_type3_message() * - * This is used to clean up the ntlm specific data. + * This is used to generate an already encoded NTLM type-3 message ready for + * sending to the recipient. * * Parameters: * - * ntlm [in/out] - The ntlm data struct being cleaned up. + * data [in] - Pointer to 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. + * 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. */ -void Curl_sasl_ntlm_cleanup(struct ntlmdata *ntlm) +CURLcode Curl_sasl_create_ntlm_type3_message(struct SessionHandle *data, + const char *userp, + const char *passwdp, + struct ntlmdata *ntlm, + char **outptr, size_t *outlen) { - /* Free the target info */ - Curl_safefree(ntlm->target_info); - - /* Reset any variables */ - ntlm->target_info_len = 0; + return Curl_ntlm_create_type3_message(data, userp, passwdp, ntlm, outptr, + outlen); } -#endif /* USE_NTLM && !USE_WINDOWS_SSPI*/ +#endif /* USE_NTLM */ /* * Curl_sasl_create_xoauth2_message() @@ -1155,26 +683,18 @@ CURLcode Curl_sasl_create_xoauth2_message(struct SessionHandle *data, * * Parameters: * - * conn [in] - The connection data. + * conn [in] - Pointer to the connection data. * authused [in] - The authentication mechanism used. */ void Curl_sasl_cleanup(struct connectdata *conn, unsigned int authused) { -#if defined(USE_KERBEROS5) - /* Cleanup the gssapi structure */ - if(authused == SASL_MECH_GSSAPI) { - Curl_sasl_gssapi_cleanup(&conn->krb5); - } -#endif - -#if defined(USE_NTLM) +#ifdef USE_NTLM /* Cleanup the ntlm structure */ if(authused == SASL_MECH_NTLM) { - Curl_sasl_ntlm_cleanup(&conn->ntlm); + Curl_ntlm_sspi_cleanup(&conn->ntlm); } -#endif - -#if !defined(USE_KERBEROS5) && !defined(USE_NTLM) + (void)conn; +#else /* Reserved for future use */ (void)conn; (void)authused; diff --git a/lib/curl_sasl.h b/lib/curl_sasl.h index 41ef859..d2967b0 100644 --- a/lib/curl_sasl.h +++ b/lib/curl_sasl.h @@ -26,18 +26,7 @@ struct SessionHandle; struct connectdata; - -#if !defined(CURL_DISABLE_CRYPTO_AUTH) -struct digestdata; -#endif - -#if defined(USE_NTLM) struct ntlmdata; -#endif - -#if defined(USE_KERBEROS5) -struct kerberos5data; -#endif /* Authentication mechanism values */ #define SASL_AUTH_NONE 0 @@ -63,23 +52,11 @@ struct kerberos5data; #define SASL_MECH_STRING_NTLM "NTLM" #define SASL_MECH_STRING_XOAUTH2 "XOAUTH2" -enum { - CURLDIGESTALGO_MD5, - CURLDIGESTALGO_MD5SESS -}; - /* This is used to test whether the line starts with the given mechanism */ #define sasl_mech_equal(line, wordlen, mech) \ (wordlen == (sizeof(mech) - 1) / sizeof(char) && \ !memcmp(line, mech, wordlen)) -/* This is used to build a SPN string */ -#if !defined(USE_WINDOWS_SSPI) -char *Curl_sasl_build_spn(const char *service, const char *instance); -#else -TCHAR *Curl_sasl_build_spn(const char *service, const char *instance); -#endif - /* This is used to generate a base64 encoded PLAIN authentication message */ CURLcode Curl_sasl_create_plain_message(struct SessionHandle *data, const char *userp, @@ -111,22 +88,6 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data, const char *passwdp, const char *service, char **outptr, size_t *outlen); - -/* This is used to decode a HTTP DIGEST challenge message */ -CURLcode Curl_sasl_decode_digest_http_message(const char *chlg, - struct digestdata *digest); - -/* This is used to generate a HTTP DIGEST response message */ -CURLcode Curl_sasl_create_digest_http_message(struct SessionHandle *data, - const char *userp, - const char *passwdp, - const unsigned char *request, - const unsigned char *uri, - struct digestdata *digest, - char **outptr, size_t *outlen); - -/* This is used to clean up the digest specific data */ -void Curl_sasl_digest_cleanup(struct digestdata *digest); #endif #ifdef USE_NTLM @@ -149,35 +110,8 @@ CURLcode Curl_sasl_create_ntlm_type3_message(struct SessionHandle *data, struct ntlmdata *ntlm, char **outptr, size_t *outlen); -/* This is used to clean up the ntlm specific data */ -void Curl_sasl_ntlm_cleanup(struct ntlmdata *ntlm); - #endif /* USE_NTLM */ -#if defined(USE_KERBEROS5) -/* This is used to generate a base64 encoded GSSAPI (Kerberos V5) user token - message */ -CURLcode Curl_sasl_create_gssapi_user_message(struct SessionHandle *data, - const char *userp, - const char *passwdp, - const char *service, - const bool mutual, - const char *chlg64, - struct kerberos5data *krb5, - char **outptr, size_t *outlen); - -/* This is used to generate a base64 encoded GSSAPI (Kerberos V5) security - token message */ -CURLcode Curl_sasl_create_gssapi_security_message(struct SessionHandle *data, - const char *input, - struct kerberos5data *krb5, - char **outptr, - size_t *outlen); - -/* This is used to clean up the gssapi specific data */ -void Curl_sasl_gssapi_cleanup(struct kerberos5data *krb5); -#endif /* USE_KERBEROS5 */ - /* This is used to generate a base64 encoded XOAUTH2 authentication message containing the user name and bearer token */ CURLcode Curl_sasl_create_xoauth2_message(struct SessionHandle *data, diff --git a/lib/curl_sasl_gssapi.c b/lib/curl_sasl_gssapi.c deleted file mode 100644 index d8f8119..0000000 --- a/lib/curl_sasl_gssapi.c +++ /dev/null @@ -1,390 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2014 - 2015, Steve Holme, . - * Copyright (C) 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 http://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. - * - * RFC4752 The Kerberos V5 ("GSSAPI") SASL Mechanism - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if defined(HAVE_GSSAPI) && defined(USE_KERBEROS5) - -#include - -#include "curl_sasl.h" -#include "urldata.h" -#include "curl_base64.h" -#include "curl_gssapi.h" -#include "curl_memory.h" -#include "sendf.h" - -#define _MPRINTF_REPLACE /* use our functions only */ -#include - -/* The last #include file should be: */ -#include "memdebug.h" - -/* -* Curl_sasl_build_gssapi_spn() -* -* This is used to build a SPN string in the format service@host. -* -* Parameters: -* -* serivce [in] - The service type such as www, smtp, pop or imap. -* host [in] - The host name or realm. -* -* Returns a pointer to the newly allocated SPN. -*/ -static char *Curl_sasl_build_gssapi_spn(const char *service, const char *host) -{ - /* Generate and return our SPN */ - return aprintf("%s@%s", service, host); -} - -/* - * Curl_sasl_create_gssapi_user_message() - * - * This is used to generate an already encoded GSSAPI (Kerberos V5) user token - * message ready for sending to the recipient. - * - * Parameters: - * - * data [in] - The session handle. - * userp [in] - The user name. - * passdwp [in] - The user's password. - * service [in] - The service type such as www, smtp, pop or imap. - * mutual_auth [in] - Flag specifing whether or not mutual authentication - * is enabled. - * chlg64 [in] - Pointer to the optional base64 encoded challenge - * message. - * krb5 [in/out] - The gssapi 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_sasl_create_gssapi_user_message(struct SessionHandle *data, - const char *userp, - const char *passwdp, - const char *service, - const bool mutual_auth, - const char *chlg64, - struct kerberos5data *krb5, - char **outptr, size_t *outlen) -{ - CURLcode result = CURLE_OK; - size_t chlglen = 0; - unsigned char *chlg = NULL; - OM_uint32 gss_status; - OM_uint32 gss_major_status; - OM_uint32 gss_minor_status; - gss_buffer_desc spn_token = GSS_C_EMPTY_BUFFER; - gss_buffer_desc input_token = GSS_C_EMPTY_BUFFER; - gss_buffer_desc output_token = GSS_C_EMPTY_BUFFER; - - (void) userp; - (void) passwdp; - - if(krb5->context == GSS_C_NO_CONTEXT) { - /* Generate our SPN */ - char *spn = Curl_sasl_build_gssapi_spn(service, - data->easy_conn->host.name); - if(!spn) - return CURLE_OUT_OF_MEMORY; - - /* Populate the SPN structure */ - spn_token.value = spn; - spn_token.length = strlen(spn); - - /* Import the SPN */ - gss_major_status = gss_import_name(&gss_minor_status, &spn_token, - GSS_C_NT_HOSTBASED_SERVICE, &krb5->spn); - if(GSS_ERROR(gss_major_status)) { - Curl_gss_log_error(data, gss_minor_status, "gss_import_name() failed: "); - - return CURLE_OUT_OF_MEMORY; - } - } - else { - /* Decode the base-64 encoded challenge message */ - if(strlen(chlg64) && *chlg64 != '=') { - result = Curl_base64_decode(chlg64, &chlg, &chlglen); - if(result) - return result; - } - - /* Ensure we have a valid challenge message */ - if(!chlg) { - infof(data, "GSSAPI handshake failure (empty challenge message)\n"); - - return CURLE_BAD_CONTENT_ENCODING; - } - - /* Setup the challenge "input" security buffer */ - input_token.value = chlg; - input_token.length = chlglen; - } - - gss_major_status = Curl_gss_init_sec_context(data, - &gss_minor_status, - &krb5->context, - krb5->spn, - &Curl_krb5_mech_oid, - GSS_C_NO_CHANNEL_BINDINGS, - &input_token, - &output_token, - mutual_auth, - NULL); - - Curl_safefree(input_token.value); - - if(GSS_ERROR(gss_major_status)) { - if(output_token.value) - gss_release_buffer(&gss_status, &output_token); - - Curl_gss_log_error(data, gss_minor_status, - "gss_init_sec_context() failed: "); - - return CURLE_RECV_ERROR; - } - - if(output_token.value && output_token.length) { - /* Base64 encode the response */ - result = Curl_base64_encode(data, (char *) output_token.value, - output_token.length, outptr, outlen); - - gss_release_buffer(&gss_status, &output_token); - } - - return result; -} - -/* - * Curl_sasl_create_gssapi_security_message() - * - * This is used to generate an already encoded GSSAPI (Kerberos V5) security - * token message ready for sending to the recipient. - * - * Parameters: - * - * data [in] - The session handle. - * chlg64 [in] - Pointer to the optional base64 encoded challenge message. - * krb5 [in/out] - The gssapi 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_sasl_create_gssapi_security_message(struct SessionHandle *data, - const char *chlg64, - struct kerberos5data *krb5, - char **outptr, - size_t *outlen) -{ - CURLcode result = CURLE_OK; - size_t chlglen = 0; - size_t messagelen = 0; - unsigned char *chlg = NULL; - unsigned char *message = NULL; - OM_uint32 gss_status; - OM_uint32 gss_major_status; - OM_uint32 gss_minor_status; - gss_buffer_desc input_token = GSS_C_EMPTY_BUFFER; - gss_buffer_desc output_token = GSS_C_EMPTY_BUFFER; - unsigned int indata = 0; - unsigned int outdata = 0; - gss_qop_t qop = GSS_C_QOP_DEFAULT; - unsigned int sec_layer = 0; - unsigned int max_size = 0; - gss_name_t username = GSS_C_NO_NAME; - gss_buffer_desc username_token; - - /* Decode the base-64 encoded input message */ - if(strlen(chlg64) && *chlg64 != '=') { - result = Curl_base64_decode(chlg64, &chlg, &chlglen); - if(result) - return result; - } - - /* Ensure we have a valid challenge message */ - if(!chlg) { - infof(data, "GSSAPI handshake failure (empty security message)\n"); - - return CURLE_BAD_CONTENT_ENCODING; - } - - /* Get the fully qualified username back from the context */ - gss_major_status = gss_inquire_context(&gss_minor_status, krb5->context, - &username, NULL, NULL, NULL, NULL, - NULL, NULL); - if(GSS_ERROR(gss_major_status)) { - Curl_gss_log_error(data, gss_minor_status, - "gss_inquire_context() failed: "); - - Curl_safefree(chlg); - - return CURLE_OUT_OF_MEMORY; - } - - /* Convert the username from internal format to a displayable token */ - gss_major_status = gss_display_name(&gss_minor_status, username, - &username_token, NULL); - if(GSS_ERROR(gss_major_status)) { - Curl_gss_log_error(data, gss_minor_status, "gss_display_name() failed: "); - - Curl_safefree(chlg); - - return CURLE_OUT_OF_MEMORY; - } - - /* Setup the challenge "input" security buffer */ - input_token.value = chlg; - input_token.length = chlglen; - - /* Decrypt the inbound challenge and obtain the qop */ - gss_major_status = gss_unwrap(&gss_minor_status, krb5->context, &input_token, - &output_token, NULL, &qop); - if(GSS_ERROR(gss_major_status)) { - Curl_gss_log_error(data, gss_minor_status, "gss_unwrap() failed: "); - - gss_release_buffer(&gss_status, &username_token); - Curl_safefree(chlg); - - return CURLE_BAD_CONTENT_ENCODING; - } - - /* Not 4 octets long so fail as per RFC4752 Section 3.1 */ - if(output_token.length != 4) { - infof(data, "GSSAPI handshake failure (invalid security data)\n"); - - gss_release_buffer(&gss_status, &username_token); - Curl_safefree(chlg); - - return CURLE_BAD_CONTENT_ENCODING; - } - - /* Copy the data out and free the challenge as it is not required anymore */ - memcpy(&indata, output_token.value, 4); - gss_release_buffer(&gss_status, &output_token); - Curl_safefree(chlg); - - /* Extract the security layer */ - sec_layer = indata & 0x000000FF; - if(!(sec_layer & GSSAUTH_P_NONE)) { - infof(data, "GSSAPI handshake failure (invalid security layer)\n"); - - gss_release_buffer(&gss_status, &username_token); - - return CURLE_BAD_CONTENT_ENCODING; - } - - /* Extract the maximum message size the server can receive */ - max_size = ntohl(indata & 0xFFFFFF00); - if(max_size > 0) { - /* The server has told us it supports a maximum receive buffer, however, as - we don't require one unless we are encrypting data, we tell the server - our receive buffer is zero. */ - max_size = 0; - } - - /* Allocate our message */ - messagelen = sizeof(outdata) + username_token.length + 1; - message = malloc(messagelen); - if(!message) { - gss_release_buffer(&gss_status, &username_token); - - return CURLE_OUT_OF_MEMORY; - } - - /* Populate the message with the security layer, client supported receive - message size and authorization identity including the 0x00 based - terminator. Note: Dispite RFC4752 Section 3.1 stating "The authorization - identity is not terminated with the zero-valued (%x00) octet." it seems - necessary to include it. */ - outdata = htonl(max_size) | sec_layer; - memcpy(message, &outdata, sizeof(outdata)); - memcpy(message + sizeof(outdata), username_token.value, - username_token.length); - message[messagelen - 1] = '\0'; - - /* Free the username token as it is not required anymore */ - gss_release_buffer(&gss_status, &username_token); - - /* Setup the "authentication data" security buffer */ - input_token.value = message; - input_token.length = messagelen; - - /* Encrypt the data */ - gss_major_status = gss_wrap(&gss_minor_status, krb5->context, 0, - GSS_C_QOP_DEFAULT, &input_token, NULL, - &output_token); - if(GSS_ERROR(gss_major_status)) { - Curl_gss_log_error(data, gss_minor_status, "gss_wrap() failed: "); - - Curl_safefree(message); - - return CURLE_OUT_OF_MEMORY; - } - - /* Base64 encode the response */ - result = Curl_base64_encode(data, (char *) output_token.value, - output_token.length, outptr, outlen); - - /* Free the output buffer */ - gss_release_buffer(&gss_status, &output_token); - - /* Free the message buffer */ - Curl_safefree(message); - - return result; -} - -/* - * Curl_sasl_gssapi_cleanup() - * - * This is used to clean up the gssapi specific data. - * - * Parameters: - * - * krb5 [in/out] - The kerberos 5 data struct being cleaned up. - * - */ -void Curl_sasl_gssapi_cleanup(struct kerberos5data *krb5) -{ - OM_uint32 minor_status; - - /* Free our security context */ - if(krb5->context != GSS_C_NO_CONTEXT) { - gss_delete_sec_context(&minor_status, &krb5->context, GSS_C_NO_BUFFER); - krb5->context = GSS_C_NO_CONTEXT; - } - - /* Free the SPN */ - if(krb5->spn != GSS_C_NO_NAME) { - gss_release_name(&minor_status, &krb5->spn); - krb5->spn = GSS_C_NO_NAME; - } -} - -#endif /* HAVE_GSSAPI && USE_KERBEROS5 */ diff --git a/lib/curl_sasl_sspi.c b/lib/curl_sasl_sspi.c index 0509b75..0135d30 100644 --- a/lib/curl_sasl_sspi.c +++ b/lib/curl_sasl_sspi.c @@ -5,7 +5,6 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2014, Steve Holme, . * Copyright (C) 2014, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which @@ -19,16 +18,14 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * RFC2617 Basic and Digest Access Authentication * RFC2831 DIGEST-MD5 authentication * RFC4422 Simple Authentication and Security Layer (SASL) - * RFC4752 The Kerberos V5 ("GSSAPI") SASL Mechanism * ***************************************************************************/ #include "curl_setup.h" -#if defined(USE_WINDOWS_SSPI) +#if defined(USE_WINDOWS_SSPI) && !defined(CURL_DISABLE_CRYPTO_AUTH) #include @@ -37,9 +34,6 @@ #include "curl_base64.h" #include "warnless.h" #include "curl_memory.h" -#include "curl_multibyte.h" -#include "sendf.h" -#include "strdup.h" #define _MPRINTF_REPLACE /* use our functions only */ #include @@ -48,52 +42,6 @@ #include "memdebug.h" /* - * Curl_sasl_build_spn() - * - * This is used to build a SPN string in the format service/host. - * - * Parameters: - * - * serivce [in] - The service type such as www, smtp, pop or imap. - * host [in] - The host name or realm. - * - * Returns a pointer to the newly allocated SPN. - */ -TCHAR *Curl_sasl_build_spn(const char *service, const char *host) -{ - char *utf8_spn = NULL; - TCHAR *tchar_spn = NULL; - - /* Note: We could use DsMakeSPN() or DsClientMakeSpnForTargetServer() rather - than doing this ourselves but the first is only available in Windows XP - and Windows Server 2003 and the latter is only available in Windows 2000 - but not Windows95/98/ME or Windows NT4.0 unless the Active Directory - Client Extensions are installed. As such it is far simpler for us to - formulate the SPN instead. */ - - /* Allocate our UTF8 based SPN */ - utf8_spn = aprintf("%s/%s", service, host); - if(!utf8_spn) { - return NULL; - } - - /* Allocate our TCHAR based SPN */ - tchar_spn = Curl_convert_UTF8_to_tchar(utf8_spn); - if(!tchar_spn) { - Curl_safefree(utf8_spn); - - return NULL; - } - - /* Release the UTF8 variant when operating with Unicode */ - Curl_unicodefree(utf8_spn); - - /* Return our newly allocated SPN */ - return tchar_spn; -} - -#if !defined(CURL_DISABLE_CRYPTO_AUTH) -/* * Curl_sasl_create_digest_md5_message() * * This is used to generate an already encoded DIGEST-MD5 response message @@ -102,8 +50,8 @@ TCHAR *Curl_sasl_build_spn(const char *service, const char *host) * Parameters: * * data [in] - The session handle. - * chlg64 [in] - The base64 encoded challenge message. - * userp [in] - The user name in the format User or Domain\User. + * chlg64 [in] - Pointer to the base64 encoded challenge message. + * userp [in] - The user name. * passdwp [in] - The user's password. * service [in] - The service type such as www, smtp, pop or imap. * outptr [in/out] - The address where a pointer to newly allocated memory @@ -120,101 +68,75 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data, char **outptr, size_t *outlen) { CURLcode result = CURLE_OK; - TCHAR *spn = NULL; + char *spn = NULL; size_t chlglen = 0; - size_t token_max = 0; - unsigned char *input_token = NULL; - unsigned char *output_token = NULL; - CredHandle credentials; - CtxtHandle context; + unsigned char *chlg = NULL; + unsigned char resp[1024]; + CredHandle handle; + CtxtHandle ctx; PSecPkgInfo SecurityPackage; SEC_WINNT_AUTH_IDENTITY identity; - SEC_WINNT_AUTH_IDENTITY *p_identity; SecBuffer chlg_buf; SecBuffer resp_buf; SecBufferDesc chlg_desc; SecBufferDesc resp_desc; SECURITY_STATUS status; unsigned long attrs; - TimeStamp expiry; /* For Windows 9x compatibility of SSPI calls */ + TimeStamp tsDummy; /* For Windows 9x compatibility of SSPI calls */ /* Decode the base-64 encoded challenge message */ if(strlen(chlg64) && *chlg64 != '=') { - result = Curl_base64_decode(chlg64, &input_token, &chlglen); + result = Curl_base64_decode(chlg64, &chlg, &chlglen); if(result) return result; } /* Ensure we have a valid challenge message */ - if(!input_token) { - infof(data, "DIGEST-MD5 handshake failure (empty challenge message)\n"); - + if(!chlg) return CURLE_BAD_CONTENT_ENCODING; + + /* Ensure we have some login credientials as DigestSSP cannot use the current + Windows user like NTLMSSP can */ + if(!userp || !*userp) { + Curl_safefree(chlg); + return CURLE_LOGIN_DENIED; } /* Query the security package for DigestSSP */ - status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT(SP_NAME_DIGEST), + status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT("WDigest"), &SecurityPackage); if(status != SEC_E_OK) { - Curl_safefree(input_token); - + Curl_safefree(chlg); return CURLE_NOT_BUILT_IN; } - token_max = SecurityPackage->cbMaxToken; - - /* Release the package buffer as it is not required anymore */ - s_pSecFn->FreeContextBuffer(SecurityPackage); - - /* Allocate our response buffer */ - output_token = malloc(token_max); - if(!output_token) { - Curl_safefree(input_token); - + /* Calculate our SPN */ + spn = aprintf("%s/%s", service, data->easy_conn->host.name); + if(!spn) return CURLE_OUT_OF_MEMORY; - } - /* Generate our SPN */ - spn = Curl_sasl_build_spn(service, data->easy_conn->host.name); - if(!spn) { - Curl_safefree(output_token); - Curl_safefree(input_token); - - return CURLE_OUT_OF_MEMORY; - } - - if(userp && *userp) { - /* Populate our identity structure */ - result = Curl_create_sspi_identity(userp, passwdp, &identity); - if(result) { - Curl_safefree(spn); - Curl_safefree(output_token); - Curl_safefree(input_token); - - return result; - } + /* Populate our identity structure */ + result = Curl_create_sspi_identity(userp, passwdp, &identity); + if(result) { + Curl_safefree(spn); + Curl_safefree(chlg); - /* Allow proper cleanup of the identity structure */ - p_identity = &identity; + return result; } - else - /* Use the current Windows user */ - p_identity = NULL; - /* Acquire our credentials handle */ + /* Acquire our credientials handle */ status = s_pSecFn->AcquireCredentialsHandle(NULL, - (TCHAR *) TEXT(SP_NAME_DIGEST), + (TCHAR *) TEXT("WDigest"), SECPKG_CRED_OUTBOUND, NULL, - p_identity, NULL, NULL, - &credentials, &expiry); + &identity, NULL, NULL, + &handle, &tsDummy); if(status != SEC_E_OK) { - Curl_sspi_free_identity(p_identity); + Curl_sspi_free_identity(&identity); Curl_safefree(spn); - Curl_safefree(output_token); - Curl_safefree(input_token); + Curl_safefree(chlg); - return CURLE_LOGIN_DENIED; + return CURLE_OUT_OF_MEMORY; } /* Setup the challenge "input" security buffer */ @@ -222,7 +144,7 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data, chlg_desc.cBuffers = 1; chlg_desc.pBuffers = &chlg_buf; chlg_buf.BufferType = SECBUFFER_TOKEN; - chlg_buf.pvBuffer = input_token; + chlg_buf.pvBuffer = chlg; chlg_buf.cbBuffer = curlx_uztoul(chlglen); /* Setup the response "output" security buffer */ @@ -230,980 +152,49 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data, resp_desc.cBuffers = 1; resp_desc.pBuffers = &resp_buf; resp_buf.BufferType = SECBUFFER_TOKEN; - resp_buf.pvBuffer = output_token; - resp_buf.cbBuffer = curlx_uztoul(token_max); - - /* Generate our response message */ - status = s_pSecFn->InitializeSecurityContext(&credentials, NULL, spn, - 0, 0, 0, &chlg_desc, 0, - &context, &resp_desc, &attrs, - &expiry); + resp_buf.pvBuffer = resp; + resp_buf.cbBuffer = sizeof(resp); - if(status == SEC_I_COMPLETE_NEEDED || - status == SEC_I_COMPLETE_AND_CONTINUE) - s_pSecFn->CompleteAuthToken(&credentials, &resp_desc); - else if(status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED) { - s_pSecFn->FreeCredentialsHandle(&credentials); - Curl_sspi_free_identity(p_identity); + /* Generate our challenge-response message */ + status = s_pSecFn->InitializeSecurityContext(&handle, + NULL, + (TCHAR *) spn, + 0, 0, 0, + &chlg_desc, + 0, &ctx, + &resp_desc, + &attrs, &tsDummy); + + if(status == SEC_I_COMPLETE_AND_CONTINUE || + status == SEC_I_CONTINUE_NEEDED) + s_pSecFn->CompleteAuthToken(&handle, &resp_desc); + else if(status != SEC_E_OK) { + s_pSecFn->FreeCredentialsHandle(&handle); + Curl_sspi_free_identity(&identity); Curl_safefree(spn); - Curl_safefree(output_token); - Curl_safefree(input_token); + Curl_safefree(chlg); return CURLE_RECV_ERROR; } /* Base64 encode the response */ - result = Curl_base64_encode(data, (char *) output_token, resp_buf.cbBuffer, - outptr, outlen); + result = Curl_base64_encode(data, (char *)resp, resp_buf.cbBuffer, outptr, + outlen); /* Free our handles */ - s_pSecFn->DeleteSecurityContext(&context); - s_pSecFn->FreeCredentialsHandle(&credentials); + s_pSecFn->DeleteSecurityContext(&ctx); + s_pSecFn->FreeCredentialsHandle(&handle); /* Free the identity structure */ - Curl_sspi_free_identity(p_identity); + Curl_sspi_free_identity(&identity); /* Free the SPN */ Curl_safefree(spn); - /* Free the response buffer */ - Curl_safefree(output_token); - - /* Free the decoded challenge message */ - Curl_safefree(input_token); - - return result; -} - -/* - * Curl_sasl_decode_digest_http_message() - * - * This is used to decode a HTTP DIGEST challenge message into the seperate - * attributes. - * - * Parameters: - * - * chlg [in] - The challenge message. - * digest [in/out] - The digest data struct being used and modified. - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_sasl_decode_digest_http_message(const char *chlg, - struct digestdata *digest) -{ - size_t chlglen = strlen(chlg); - - /* We had an input token before and we got another one now. This means we - provided bad credentials in the previous request. */ - if(digest->input_token) - return CURLE_BAD_CONTENT_ENCODING; - - /* Simply store the challenge for use later */ - digest->input_token = (BYTE *) Curl_memdup(chlg, chlglen); - if(!digest->input_token) - return CURLE_OUT_OF_MEMORY; - - digest->input_token_len = chlglen; - - return CURLE_OK; -} - -/* - * Curl_sasl_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 in the format User or Domain\User. - * 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_sasl_create_digest_http_message(struct SessionHandle *data, - const char *userp, - const char *passwdp, - const unsigned char *request, - const unsigned char *uripath, - struct digestdata *digest, - char **outptr, size_t *outlen) -{ - size_t token_max; - CredHandle credentials; - CtxtHandle context; - char *resp; - BYTE *output_token; - PSecPkgInfo SecurityPackage; - SEC_WINNT_AUTH_IDENTITY identity; - SEC_WINNT_AUTH_IDENTITY *p_identity; - SecBuffer chlg_buf[3]; - SecBuffer resp_buf; - SecBufferDesc chlg_desc; - SecBufferDesc resp_desc; - SECURITY_STATUS status; - unsigned long attrs; - TimeStamp expiry; /* For Windows 9x compatibility of SSPI calls */ - - (void) data; - - /* Query the security package for DigestSSP */ - status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT(SP_NAME_DIGEST), - &SecurityPackage); - if(status != SEC_E_OK) - return CURLE_NOT_BUILT_IN; - - token_max = SecurityPackage->cbMaxToken; - - /* Release the package buffer as it is not required anymore */ - s_pSecFn->FreeContextBuffer(SecurityPackage); - - /* Allocate the output buffer according to the max token size as indicated - by the security package */ - output_token = malloc(token_max); - if(!output_token) - return CURLE_OUT_OF_MEMORY; - - if(userp && *userp) { - /* Populate our identity structure */ - if(Curl_create_sspi_identity(userp, passwdp, &identity)) - return CURLE_OUT_OF_MEMORY; - - /* Allow proper cleanup of the identity structure */ - p_identity = &identity; - } - else - /* Use the current Windows user */ - p_identity = NULL; - - /* Acquire our credentials handle */ - status = s_pSecFn->AcquireCredentialsHandle(NULL, - (TCHAR *) TEXT(SP_NAME_DIGEST), - SECPKG_CRED_OUTBOUND, NULL, - p_identity, NULL, NULL, - &credentials, &expiry); - if(status != SEC_E_OK) { - Curl_safefree(output_token); - - return CURLE_LOGIN_DENIED; - } - - /* Setup the challenge "input" security buffer if present */ - chlg_desc.ulVersion = SECBUFFER_VERSION; - chlg_desc.cBuffers = 3; - chlg_desc.pBuffers = chlg_buf; - chlg_buf[0].BufferType = SECBUFFER_TOKEN; - chlg_buf[0].pvBuffer = digest->input_token; - chlg_buf[0].cbBuffer = curlx_uztoul(digest->input_token_len); - chlg_buf[1].BufferType = SECBUFFER_PKG_PARAMS; - chlg_buf[1].pvBuffer = (void *)request; - chlg_buf[1].cbBuffer = curlx_uztoul(strlen((const char *) request)); - chlg_buf[2].BufferType = SECBUFFER_PKG_PARAMS; - chlg_buf[2].pvBuffer = NULL; - chlg_buf[2].cbBuffer = 0; - - /* Setup the response "output" security buffer */ - resp_desc.ulVersion = SECBUFFER_VERSION; - resp_desc.cBuffers = 1; - resp_desc.pBuffers = &resp_buf; - resp_buf.BufferType = SECBUFFER_TOKEN; - resp_buf.pvBuffer = output_token; - resp_buf.cbBuffer = curlx_uztoul(token_max); - - /* Generate our reponse message */ - status = s_pSecFn->InitializeSecurityContext(&credentials, NULL, - (TCHAR *) uripath, - ISC_REQ_USE_HTTP_STYLE, 0, 0, - &chlg_desc, 0, &context, - &resp_desc, &attrs, &expiry); - - if(status == SEC_I_COMPLETE_NEEDED || - status == SEC_I_COMPLETE_AND_CONTINUE) - s_pSecFn->CompleteAuthToken(&credentials, &resp_desc); - else if(status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED) { - s_pSecFn->FreeCredentialsHandle(&credentials); - - Curl_safefree(output_token); - - return CURLE_OUT_OF_MEMORY; - } - - resp = malloc(resp_buf.cbBuffer + 1); - if(!resp) { - s_pSecFn->DeleteSecurityContext(&context); - s_pSecFn->FreeCredentialsHandle(&credentials); - - Curl_safefree(output_token); - - return CURLE_OUT_OF_MEMORY; - } - - /* Copy the generated reponse */ - memcpy(resp, resp_buf.pvBuffer, resp_buf.cbBuffer); - resp[resp_buf.cbBuffer] = 0x00; - - /* Return the response */ - *outptr = resp; - *outlen = resp_buf.cbBuffer; - - /* Free our handles */ - s_pSecFn->DeleteSecurityContext(&context); - s_pSecFn->FreeCredentialsHandle(&credentials); - - /* Free the identity structure */ - Curl_sspi_free_identity(p_identity); - - /* Free the response buffer */ - Curl_safefree(output_token); - - return CURLE_OK; -} - -/* - * Curl_sasl_digest_cleanup() - * - * This is used to clean up the digest specific data. - * - * Parameters: - * - * digest [in/out] - The digest data struct being cleaned up. - * - */ -void Curl_sasl_digest_cleanup(struct digestdata *digest) -{ - /* Free the input token */ - Curl_safefree(digest->input_token); - - /* Reset any variables */ - digest->input_token_len = 0; -} -#endif /* !CURL_DISABLE_CRYPTO_AUTH */ - -#if defined USE_NTLM -/* -* Curl_sasl_create_ntlm_type1_message() -* -* This is used to generate an already encoded NTLM type-1 message ready for -* sending to the recipient. -* -* Parameters: -* -* 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. -* 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_sasl_create_ntlm_type1_message(const char *userp, - const char *passwdp, - struct ntlmdata *ntlm, - char **outptr, size_t *outlen) -{ - PSecPkgInfo SecurityPackage; - SecBuffer type_1_buf; - SecBufferDesc type_1_desc; - SECURITY_STATUS status; - unsigned long attrs; - TimeStamp expiry; /* For Windows 9x compatibility of SSPI calls */ - - /* Clean up any former leftovers and initialise to defaults */ - Curl_sasl_ntlm_cleanup(ntlm); - - /* Query the security package for NTLM */ - status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT(SP_NAME_NTLM), - &SecurityPackage); - if(status != SEC_E_OK) - return CURLE_NOT_BUILT_IN; - - ntlm->token_max = SecurityPackage->cbMaxToken; - - /* Release the package buffer as it is not required anymore */ - s_pSecFn->FreeContextBuffer(SecurityPackage); - - /* Allocate our output buffer */ - ntlm->output_token = malloc(ntlm->token_max); - if(!ntlm->output_token) - return CURLE_OUT_OF_MEMORY; - - if(userp && *userp) { - CURLcode result; - - /* Populate our identity structure */ - result = Curl_create_sspi_identity(userp, passwdp, &ntlm->identity); - if(result) - return result; - - /* Allow proper cleanup of the identity structure */ - ntlm->p_identity = &ntlm->identity; - } - else - /* Use the current Windows user */ - ntlm->p_identity = NULL; - - /* Allocate our credentials handle */ - ntlm->credentials = malloc(sizeof(CredHandle)); - if(!ntlm->credentials) - return CURLE_OUT_OF_MEMORY; - - memset(ntlm->credentials, 0, sizeof(CredHandle)); - - /* Acquire our credentials handle */ - status = s_pSecFn->AcquireCredentialsHandle(NULL, - (TCHAR *) TEXT(SP_NAME_NTLM), - SECPKG_CRED_OUTBOUND, NULL, - ntlm->p_identity, NULL, NULL, - ntlm->credentials, &expiry); - if(status != SEC_E_OK) - return CURLE_LOGIN_DENIED; - - /* Allocate our new context handle */ - ntlm->context = malloc(sizeof(CtxtHandle)); - if(!ntlm->context) - return CURLE_OUT_OF_MEMORY; - - memset(ntlm->context, 0, sizeof(CtxtHandle)); - - /* Setup the type-1 "output" security buffer */ - type_1_desc.ulVersion = SECBUFFER_VERSION; - type_1_desc.cBuffers = 1; - type_1_desc.pBuffers = &type_1_buf; - type_1_buf.BufferType = SECBUFFER_TOKEN; - type_1_buf.pvBuffer = ntlm->output_token; - type_1_buf.cbBuffer = curlx_uztoul(ntlm->token_max); - - /* Generate our type-1 message */ - status = s_pSecFn->InitializeSecurityContext(ntlm->credentials, NULL, - (TCHAR *) TEXT(""), - 0, 0, SECURITY_NETWORK_DREP, - NULL, 0, - ntlm->context, &type_1_desc, - &attrs, &expiry); - if(status == SEC_I_COMPLETE_NEEDED || - status == SEC_I_COMPLETE_AND_CONTINUE) - s_pSecFn->CompleteAuthToken(ntlm->context, &type_1_desc); - else if(status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED) - return CURLE_RECV_ERROR; - - /* Base64 encode the response */ - return Curl_base64_encode(NULL, (char *) ntlm->output_token, - type_1_buf.cbBuffer, outptr, outlen); -} - -/* -* Curl_sasl_decode_ntlm_type2_message() -* -* This is used to decode an already encoded NTLM type-2 message. -* -* Parameters: -* -* data [in] - The session handle. -* type2msg [in] - The base64 encoded type-2 message. -* ntlm [in/out] - The ntlm data struct being used and modified. -* -* Returns CURLE_OK on success. -*/ -CURLcode Curl_sasl_decode_ntlm_type2_message(struct SessionHandle *data, - const char *type2msg, - struct ntlmdata *ntlm) -{ - CURLcode result = CURLE_OK; - unsigned char *type2 = NULL; - size_t type2_len = 0; - -#if defined(CURL_DISABLE_VERBOSE_STRINGS) - (void) data; -#endif - - /* Decode the base-64 encoded type-2 message */ - if(strlen(type2msg) && *type2msg != '=') { - result = Curl_base64_decode(type2msg, &type2, &type2_len); - if(result) - return result; - } - - /* Ensure we have a valid type-2 message */ - if(!type2) { - infof(data, "NTLM handshake failure (empty type-2 message)\n"); - - return CURLE_BAD_CONTENT_ENCODING; - } - - /* Simply store the challenge for use later */ - ntlm->input_token = type2; - ntlm->input_token_len = type2_len; - - return result; -} - -/* -* Curl_sasl_create_ntlm_type3_message() -* -* This is used to generate an already encoded NTLM type-3 message ready for -* sending to the recipient. -* -* 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. -* 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_sasl_create_ntlm_type3_message(struct SessionHandle *data, - const char *userp, - const char *passwdp, - struct ntlmdata *ntlm, - char **outptr, size_t *outlen) -{ - CURLcode result = CURLE_OK; - SecBuffer type_2_buf; - SecBuffer type_3_buf; - SecBufferDesc type_2_desc; - SecBufferDesc type_3_desc; - SECURITY_STATUS status; - unsigned long attrs; - TimeStamp expiry; /* For Windows 9x compatibility of SSPI calls */ - - (void) passwdp; - (void) userp; - - /* Setup the type-2 "input" security buffer */ - type_2_desc.ulVersion = SECBUFFER_VERSION; - type_2_desc.cBuffers = 1; - type_2_desc.pBuffers = &type_2_buf; - type_2_buf.BufferType = SECBUFFER_TOKEN; - type_2_buf.pvBuffer = ntlm->input_token; - type_2_buf.cbBuffer = curlx_uztoul(ntlm->input_token_len); - - /* Setup the type-3 "output" security buffer */ - type_3_desc.ulVersion = SECBUFFER_VERSION; - type_3_desc.cBuffers = 1; - type_3_desc.pBuffers = &type_3_buf; - type_3_buf.BufferType = SECBUFFER_TOKEN; - type_3_buf.pvBuffer = ntlm->output_token; - type_3_buf.cbBuffer = curlx_uztoul(ntlm->token_max); - - /* Generate our type-3 message */ - status = s_pSecFn->InitializeSecurityContext(ntlm->credentials, - ntlm->context, - (TCHAR *) TEXT(""), - 0, 0, SECURITY_NETWORK_DREP, - &type_2_desc, - 0, ntlm->context, - &type_3_desc, - &attrs, &expiry); - if(status != SEC_E_OK) { - infof(data, "NTLM handshake failure (type-3 message): Status=%x\n", - status); - - return CURLE_RECV_ERROR; - } - - /* Base64 encode the response */ - result = Curl_base64_encode(data, (char *) ntlm->output_token, - type_3_buf.cbBuffer, outptr, outlen); - - Curl_sasl_ntlm_cleanup(ntlm); - - return result; -} - -/* - * Curl_sasl_ntlm_cleanup() - * - * This is used to clean up the ntlm specific data. - * - * Parameters: - * - * ntlm [in/out] - The ntlm data struct being cleaned up. - * - */ -void Curl_sasl_ntlm_cleanup(struct ntlmdata *ntlm) -{ - /* Free our security context */ - if(ntlm->context) { - s_pSecFn->DeleteSecurityContext(ntlm->context); - free(ntlm->context); - ntlm->context = NULL; - } - - /* Free our credentials handle */ - if(ntlm->credentials) { - s_pSecFn->FreeCredentialsHandle(ntlm->credentials); - free(ntlm->credentials); - ntlm->credentials = NULL; - } - - /* Free our identity */ - Curl_sspi_free_identity(ntlm->p_identity); - ntlm->p_identity = NULL; - - /* Free the input and output tokens */ - Curl_safefree(ntlm->input_token); - Curl_safefree(ntlm->output_token); - - /* Reset any variables */ - ntlm->token_max = 0; -} -#endif /* USE_NTLM */ - -#if defined(USE_KERBEROS5) -/* - * Curl_sasl_create_gssapi_user_message() - * - * This is used to generate an already encoded GSSAPI (Kerberos V5) user token - * message ready for sending to the recipient. - * - * Parameters: - * - * data [in] - The session handle. - * userp [in] - The user name in the format User or Domain\User. - * passdwp [in] - The user's password. - * service [in] - The service type such as www, smtp, pop or imap. - * mutual_auth [in] - Flag specifing whether or not mutual authentication - * is enabled. - * chlg64 [in] - The optional base64 encoded challenge message. - * krb5 [in/out] - The gssapi 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_sasl_create_gssapi_user_message(struct SessionHandle *data, - const char *userp, - const char *passwdp, - const char *service, - const bool mutual_auth, - const char *chlg64, - struct kerberos5data *krb5, - char **outptr, size_t *outlen) -{ - CURLcode result = CURLE_OK; - size_t chlglen = 0; - unsigned char *chlg = NULL; - CtxtHandle context; - PSecPkgInfo SecurityPackage; - SecBuffer chlg_buf; - SecBuffer resp_buf; - SecBufferDesc chlg_desc; - SecBufferDesc resp_desc; - SECURITY_STATUS status; - unsigned long attrs; - TimeStamp expiry; /* For Windows 9x compatibility of SSPI calls */ - - if(!krb5->credentials) { - /* Query the security package for Kerberos */ - status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) - TEXT(SP_NAME_KERBEROS), - &SecurityPackage); - if(status != SEC_E_OK) { - return CURLE_NOT_BUILT_IN; - } - - krb5->token_max = SecurityPackage->cbMaxToken; - - /* Release the package buffer as it is not required anymore */ - s_pSecFn->FreeContextBuffer(SecurityPackage); - - /* Allocate our response buffer */ - krb5->output_token = malloc(krb5->token_max); - if(!krb5->output_token) - return CURLE_OUT_OF_MEMORY; - - /* Generate our SPN */ - krb5->spn = Curl_sasl_build_spn(service, data->easy_conn->host.name); - if(!krb5->spn) - return CURLE_OUT_OF_MEMORY; - - if(userp && *userp) { - /* Populate our identity structure */ - result = Curl_create_sspi_identity(userp, passwdp, &krb5->identity); - if(result) - return result; - - /* Allow proper cleanup of the identity structure */ - krb5->p_identity = &krb5->identity; - } - else - /* Use the current Windows user */ - krb5->p_identity = NULL; - - /* Allocate our credentials handle */ - krb5->credentials = malloc(sizeof(CredHandle)); - if(!krb5->credentials) - return CURLE_OUT_OF_MEMORY; - - memset(krb5->credentials, 0, sizeof(CredHandle)); - - /* Acquire our credentials handle */ - status = s_pSecFn->AcquireCredentialsHandle(NULL, - (TCHAR *) - TEXT(SP_NAME_KERBEROS), - SECPKG_CRED_OUTBOUND, NULL, - krb5->p_identity, NULL, NULL, - krb5->credentials, &expiry); - if(status != SEC_E_OK) - return CURLE_LOGIN_DENIED; - - /* Allocate our new context handle */ - krb5->context = malloc(sizeof(CtxtHandle)); - if(!krb5->context) - return CURLE_OUT_OF_MEMORY; - - memset(krb5->context, 0, sizeof(CtxtHandle)); - } - else { - /* Decode the base-64 encoded challenge message */ - if(strlen(chlg64) && *chlg64 != '=') { - result = Curl_base64_decode(chlg64, &chlg, &chlglen); - if(result) - return result; - } - - /* Ensure we have a valid challenge message */ - if(!chlg) { - infof(data, "GSSAPI handshake failure (empty challenge message)\n"); - - return CURLE_BAD_CONTENT_ENCODING; - } - - /* Setup the challenge "input" security buffer */ - chlg_desc.ulVersion = SECBUFFER_VERSION; - chlg_desc.cBuffers = 1; - chlg_desc.pBuffers = &chlg_buf; - chlg_buf.BufferType = SECBUFFER_TOKEN; - chlg_buf.pvBuffer = chlg; - chlg_buf.cbBuffer = curlx_uztoul(chlglen); - } - - /* Setup the response "output" security buffer */ - resp_desc.ulVersion = SECBUFFER_VERSION; - resp_desc.cBuffers = 1; - resp_desc.pBuffers = &resp_buf; - resp_buf.BufferType = SECBUFFER_TOKEN; - resp_buf.pvBuffer = krb5->output_token; - resp_buf.cbBuffer = curlx_uztoul(krb5->token_max); - - /* Generate our challenge-response message */ - status = s_pSecFn->InitializeSecurityContext(krb5->credentials, - chlg ? krb5->context : NULL, - krb5->spn, - (mutual_auth ? - ISC_REQ_MUTUAL_AUTH : 0), - 0, SECURITY_NATIVE_DREP, - chlg ? &chlg_desc : NULL, 0, - &context, - &resp_desc, &attrs, - &expiry); - - if(status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED) { - Curl_safefree(chlg); - - return CURLE_RECV_ERROR; - } - - if(memcmp(&context, krb5->context, sizeof(context))) { - s_pSecFn->DeleteSecurityContext(krb5->context); - - memcpy(krb5->context, &context, sizeof(context)); - } - - if(resp_buf.cbBuffer) { - /* Base64 encode the response */ - result = Curl_base64_encode(data, (char *)resp_buf.pvBuffer, - resp_buf.cbBuffer, outptr, outlen); - } - - /* Free the decoded challenge */ + /* Free the decoeded challenge message */ Curl_safefree(chlg); return result; } -/* - * Curl_sasl_create_gssapi_security_message() - * - * This is used to generate an already encoded GSSAPI (Kerberos V5) security - * token message ready for sending to the recipient. - * - * Parameters: - * - * data [in] - The session handle. - * chlg64 [in] - The optional base64 encoded challenge message. - * krb5 [in/out] - The gssapi 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_sasl_create_gssapi_security_message(struct SessionHandle *data, - const char *chlg64, - struct kerberos5data *krb5, - char **outptr, - size_t *outlen) -{ - CURLcode result = CURLE_OK; - size_t offset = 0; - size_t chlglen = 0; - size_t messagelen = 0; - size_t appdatalen = 0; - unsigned char *chlg = NULL; - unsigned char *trailer = NULL; - unsigned char *message = NULL; - unsigned char *padding = NULL; - unsigned char *appdata = NULL; - SecBuffer input_buf[2]; - SecBuffer wrap_buf[3]; - SecBufferDesc input_desc; - SecBufferDesc wrap_desc; - unsigned long indata = 0; - unsigned long outdata = 0; - unsigned long qop = 0; - unsigned long sec_layer = 0; - unsigned long max_size = 0; - SecPkgContext_Sizes sizes; - SecPkgCredentials_Names names; - SECURITY_STATUS status; - char *user_name; - - /* Decode the base-64 encoded input message */ - if(strlen(chlg64) && *chlg64 != '=') { - result = Curl_base64_decode(chlg64, &chlg, &chlglen); - if(result) - return result; - } - - /* Ensure we have a valid challenge message */ - if(!chlg) { - infof(data, "GSSAPI handshake failure (empty security message)\n"); - - return CURLE_BAD_CONTENT_ENCODING; - } - - /* Get our response size information */ - status = s_pSecFn->QueryContextAttributes(krb5->context, - SECPKG_ATTR_SIZES, - &sizes); - if(status != SEC_E_OK) { - Curl_safefree(chlg); - - return CURLE_OUT_OF_MEMORY; - } - - /* Get the fully qualified username back from the context */ - status = s_pSecFn->QueryCredentialsAttributes(krb5->credentials, - SECPKG_CRED_ATTR_NAMES, - &names); - if(status != SEC_E_OK) { - Curl_safefree(chlg); - - return CURLE_RECV_ERROR; - } - - /* Setup the "input" security buffer */ - input_desc.ulVersion = SECBUFFER_VERSION; - input_desc.cBuffers = 2; - input_desc.pBuffers = input_buf; - input_buf[0].BufferType = SECBUFFER_STREAM; - input_buf[0].pvBuffer = chlg; - input_buf[0].cbBuffer = curlx_uztoul(chlglen); - input_buf[1].BufferType = SECBUFFER_DATA; - input_buf[1].pvBuffer = NULL; - input_buf[1].cbBuffer = 0; - - /* Decrypt the inbound challenge and obtain the qop */ - status = s_pSecFn->DecryptMessage(krb5->context, &input_desc, 0, &qop); - if(status != SEC_E_OK) { - infof(data, "GSSAPI handshake failure (empty security message)\n"); - - Curl_safefree(chlg); - - return CURLE_BAD_CONTENT_ENCODING; - } - - /* Not 4 octets long so fail as per RFC4752 Section 3.1 */ - if(input_buf[1].cbBuffer != 4) { - infof(data, "GSSAPI handshake failure (invalid security data)\n"); - - Curl_safefree(chlg); - - return CURLE_BAD_CONTENT_ENCODING; - } - - /* Copy the data out and free the challenge as it is not required anymore */ - memcpy(&indata, input_buf[1].pvBuffer, 4); - s_pSecFn->FreeContextBuffer(input_buf[1].pvBuffer); - Curl_safefree(chlg); - - /* Extract the security layer */ - sec_layer = indata & 0x000000FF; - if(!(sec_layer & KERB_WRAP_NO_ENCRYPT)) { - infof(data, "GSSAPI handshake failure (invalid security layer)\n"); - - return CURLE_BAD_CONTENT_ENCODING; - } - - /* Extract the maximum message size the server can receive */ - max_size = ntohl(indata & 0xFFFFFF00); - if(max_size > 0) { - /* The server has told us it supports a maximum receive buffer, however, as - we don't require one unless we are encrypting data, we tell the server - our receive buffer is zero. */ - max_size = 0; - } - - /* Allocate the trailer */ - trailer = malloc(sizes.cbSecurityTrailer); - if(!trailer) - return CURLE_OUT_OF_MEMORY; - - /* Convert the user name to UTF8 when operating with Unicode */ - user_name = Curl_convert_tchar_to_UTF8(names.sUserName); - if(!user_name) { - Curl_safefree(trailer); - - return CURLE_OUT_OF_MEMORY; - } - - /* Allocate our message */ - messagelen = sizeof(outdata) + strlen(user_name) + 1; - message = malloc(messagelen); - if(!message) { - Curl_safefree(trailer); - Curl_unicodefree(user_name); - - return CURLE_OUT_OF_MEMORY; - } - - /* Populate the message with the security layer, client supported receive - message size and authorization identity including the 0x00 based - terminator. Note: Dispite RFC4752 Section 3.1 stating "The authorization - identity is not terminated with the zero-valued (%x00) octet." it seems - necessary to include it. */ - outdata = htonl(max_size) | sec_layer; - memcpy(message, &outdata, sizeof(outdata)); - strcpy((char *) message + sizeof(outdata), user_name); - Curl_unicodefree(user_name); - - /* Allocate the padding */ - padding = malloc(sizes.cbBlockSize); - if(!padding) { - Curl_safefree(message); - Curl_safefree(trailer); - - return CURLE_OUT_OF_MEMORY; - } - - /* Setup the "authentication data" security buffer */ - wrap_desc.ulVersion = SECBUFFER_VERSION; - wrap_desc.cBuffers = 3; - wrap_desc.pBuffers = wrap_buf; - wrap_buf[0].BufferType = SECBUFFER_TOKEN; - wrap_buf[0].pvBuffer = trailer; - wrap_buf[0].cbBuffer = sizes.cbSecurityTrailer; - wrap_buf[1].BufferType = SECBUFFER_DATA; - wrap_buf[1].pvBuffer = message; - wrap_buf[1].cbBuffer = curlx_uztoul(messagelen); - wrap_buf[2].BufferType = SECBUFFER_PADDING; - wrap_buf[2].pvBuffer = padding; - wrap_buf[2].cbBuffer = sizes.cbBlockSize; - - /* Encrypt the data */ - status = s_pSecFn->EncryptMessage(krb5->context, KERB_WRAP_NO_ENCRYPT, - &wrap_desc, 0); - if(status != SEC_E_OK) { - Curl_safefree(padding); - Curl_safefree(message); - Curl_safefree(trailer); - - return CURLE_OUT_OF_MEMORY; - } - - /* Allocate the encryption (wrap) buffer */ - appdatalen = wrap_buf[0].cbBuffer + wrap_buf[1].cbBuffer + - wrap_buf[2].cbBuffer; - appdata = malloc(appdatalen); - if(!appdata) { - Curl_safefree(padding); - Curl_safefree(message); - Curl_safefree(trailer); - - return CURLE_OUT_OF_MEMORY; - } - - /* Populate the encryption buffer */ - memcpy(appdata, wrap_buf[0].pvBuffer, wrap_buf[0].cbBuffer); - offset += wrap_buf[0].cbBuffer; - memcpy(appdata + offset, wrap_buf[1].pvBuffer, wrap_buf[1].cbBuffer); - offset += wrap_buf[1].cbBuffer; - memcpy(appdata + offset, wrap_buf[2].pvBuffer, wrap_buf[2].cbBuffer); - - /* Base64 encode the response */ - result = Curl_base64_encode(data, (char *)appdata, appdatalen, outptr, - outlen); - - /* Free all of our local buffers */ - Curl_safefree(appdata); - Curl_safefree(padding); - Curl_safefree(message); - Curl_safefree(trailer); - - return result; -} - -/* - * Curl_sasl_gssapi_cleanup() - * - * This is used to clean up the gssapi specific data. - * - * Parameters: - * - * krb5 [in/out] - The kerberos 5 data struct being cleaned up. - * - */ -void Curl_sasl_gssapi_cleanup(struct kerberos5data *krb5) -{ - /* Free our security context */ - if(krb5->context) { - s_pSecFn->DeleteSecurityContext(krb5->context); - free(krb5->context); - krb5->context = NULL; - } - - /* Free our credentials handle */ - if(krb5->credentials) { - s_pSecFn->FreeCredentialsHandle(krb5->credentials); - free(krb5->credentials); - krb5->credentials = NULL; - } - - /* Free our identity */ - Curl_sspi_free_identity(krb5->p_identity); - krb5->p_identity = NULL; - - /* Free the SPN and output token */ - Curl_safefree(krb5->spn); - Curl_safefree(krb5->output_token); - - /* Reset any variables */ - krb5->token_max = 0; -} -#endif /* USE_KERBEROS5 */ - -#endif /* USE_WINDOWS_SSPI */ +#endif /* USE_WINDOWS_SSPI && !CURL_DISABLE_CRYPTO_AUTH */ diff --git a/lib/curl_sec.h b/lib/curl_sec.h index 6c48da2..82151e9 100644 --- a/lib/curl_sec.h +++ b/lib/curl_sec.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , 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,7 +30,7 @@ struct Curl_sec_client_mech { void (*end)(void *); int (*check_prot)(void *, int); int (*overhead)(void *, int, int); - int (*encode)(void *, const void*, int, int, void**); + int (*encode)(void *, const void*, int, int, void**, struct connectdata *); int (*decode)(void *, void*, int, int, struct connectdata *); }; diff --git a/lib/curl_setup.h b/lib/curl_setup.h index b046b77..7618b56 100644 --- a/lib/curl_setup.h +++ b/lib/curl_setup.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -602,29 +602,22 @@ int netware_init(void); #define LIBIDN_REQUIRED_VERSION "0.4.1" #if defined(USE_GNUTLS) || defined(USE_SSLEAY) || defined(USE_NSS) || \ - defined(USE_POLARSSL) || defined(USE_AXTLS) || \ + defined(USE_QSOSSL) || defined(USE_POLARSSL) || defined(USE_AXTLS) || \ defined(USE_CYASSL) || defined(USE_SCHANNEL) || \ defined(USE_DARWINSSL) || defined(USE_GSKIT) #define USE_SSL /* SSL support has been enabled */ #endif -/* Single point where USE_SPNEGO definition might be defined */ #if !defined(CURL_DISABLE_CRYPTO_AUTH) && \ (defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)) -#define USE_SPNEGO +#define USE_HTTP_NEGOTIATE #endif -/* Single point where USE_KERBEROS5 definition might be defined */ -#if !defined(CURL_DISABLE_CRYPTO_AUTH) && \ - (defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)) -#define USE_KERBEROS5 -#endif - -/* Single point where USE_NTLM definition might be defined */ -#if !defined(CURL_DISABLE_NTLM) && !defined(CURL_DISABLE_CRYPTO_AUTH) +/* Single point where USE_NTLM definition might be done */ +#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_NTLM) && \ + !defined(CURL_DISABLE_CRYPTO_AUTH) #if defined(USE_SSLEAY) || defined(USE_WINDOWS_SSPI) || \ - defined(USE_GNUTLS) || defined(USE_NSS) || defined(USE_DARWINSSL) || \ - defined(USE_OS400CRYPTO) || defined(USE_WIN32_CRYPTO) + defined(USE_GNUTLS) || defined(USE_NSS) || defined(USE_DARWINSSL) #define USE_NTLM #endif #endif @@ -643,10 +636,8 @@ int netware_init(void); #if defined(__GNUC__) && ((__GNUC__ >= 3) || \ ((__GNUC__ == 2) && defined(__GNUC_MINOR__) && (__GNUC_MINOR__ >= 7))) # define UNUSED_PARAM __attribute__((__unused__)) -# define WARN_UNUSED_RESULT __attribute__((warn_unused_result)) #else # define UNUSED_PARAM /*NOTHING*/ -# define WARN_UNUSED_RESULT #endif /* diff --git a/lib/curl_sspi.h b/lib/curl_sspi.h index 7fa308c..812d7a8 100644 --- a/lib/curl_sspi.h +++ b/lib/curl_sspi.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * 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 @@ -51,276 +51,249 @@ CURLcode Curl_create_sspi_identity(const char *userp, const char *passwdp, void Curl_sspi_free_identity(SEC_WINNT_AUTH_IDENTITY *identity); /* Forward-declaration of global variables defined in curl_sspi.c */ + extern HMODULE s_hSecDll; extern PSecurityFunctionTable s_pSecFn; /* Provide some definitions missing in old headers */ -#define SP_NAME_DIGEST "WDigest" -#define SP_NAME_NTLM "NTLM" -#define SP_NAME_NEGOTIATE "Negotiate" -#define SP_NAME_KERBEROS "Kerberos" - -#ifndef ISC_REQ_USE_HTTP_STYLE -#define ISC_REQ_USE_HTTP_STYLE 0x01000000 -#endif - -#ifndef ISC_RET_REPLAY_DETECT -#define ISC_RET_REPLAY_DETECT 0x00000004 -#endif - -#ifndef ISC_RET_SEQUENCE_DETECT -#define ISC_RET_SEQUENCE_DETECT 0x00000008 -#endif - -#ifndef ISC_RET_CONFIDENTIALITY -#define ISC_RET_CONFIDENTIALITY 0x00000010 -#endif - -#ifndef ISC_RET_ALLOCATED_MEMORY -#define ISC_RET_ALLOCATED_MEMORY 0x00000100 -#endif - -#ifndef ISC_RET_STREAM -#define ISC_RET_STREAM 0x00008000 -#endif #ifndef SEC_E_INSUFFICIENT_MEMORY -# define SEC_E_INSUFFICIENT_MEMORY ((HRESULT)0x80090300L) +# define SEC_E_INSUFFICIENT_MEMORY ((HRESULT)0x80090300L) #endif #ifndef SEC_E_INVALID_HANDLE -# define SEC_E_INVALID_HANDLE ((HRESULT)0x80090301L) +# define SEC_E_INVALID_HANDLE ((HRESULT)0x80090301L) #endif #ifndef SEC_E_UNSUPPORTED_FUNCTION -# define SEC_E_UNSUPPORTED_FUNCTION ((HRESULT)0x80090302L) +# define SEC_E_UNSUPPORTED_FUNCTION ((HRESULT)0x80090302L) #endif #ifndef SEC_E_TARGET_UNKNOWN -# define SEC_E_TARGET_UNKNOWN ((HRESULT)0x80090303L) +# define SEC_E_TARGET_UNKNOWN ((HRESULT)0x80090303L) #endif #ifndef SEC_E_INTERNAL_ERROR -# define SEC_E_INTERNAL_ERROR ((HRESULT)0x80090304L) +# define SEC_E_INTERNAL_ERROR ((HRESULT)0x80090304L) #endif #ifndef SEC_E_SECPKG_NOT_FOUND -# define SEC_E_SECPKG_NOT_FOUND ((HRESULT)0x80090305L) +# define SEC_E_SECPKG_NOT_FOUND ((HRESULT)0x80090305L) #endif #ifndef SEC_E_NOT_OWNER -# define SEC_E_NOT_OWNER ((HRESULT)0x80090306L) +# define SEC_E_NOT_OWNER ((HRESULT)0x80090306L) #endif #ifndef SEC_E_CANNOT_INSTALL -# define SEC_E_CANNOT_INSTALL ((HRESULT)0x80090307L) +# define SEC_E_CANNOT_INSTALL ((HRESULT)0x80090307L) #endif #ifndef SEC_E_INVALID_TOKEN -# define SEC_E_INVALID_TOKEN ((HRESULT)0x80090308L) +# define SEC_E_INVALID_TOKEN ((HRESULT)0x80090308L) #endif #ifndef SEC_E_CANNOT_PACK -# define SEC_E_CANNOT_PACK ((HRESULT)0x80090309L) +# define SEC_E_CANNOT_PACK ((HRESULT)0x80090309L) #endif #ifndef SEC_E_QOP_NOT_SUPPORTED -# define SEC_E_QOP_NOT_SUPPORTED ((HRESULT)0x8009030AL) +# define SEC_E_QOP_NOT_SUPPORTED ((HRESULT)0x8009030AL) #endif #ifndef SEC_E_NO_IMPERSONATION -# define SEC_E_NO_IMPERSONATION ((HRESULT)0x8009030BL) +# define SEC_E_NO_IMPERSONATION ((HRESULT)0x8009030BL) #endif #ifndef SEC_E_LOGON_DENIED -# define SEC_E_LOGON_DENIED ((HRESULT)0x8009030CL) +# define SEC_E_LOGON_DENIED ((HRESULT)0x8009030CL) #endif #ifndef SEC_E_UNKNOWN_CREDENTIALS -# define SEC_E_UNKNOWN_CREDENTIALS ((HRESULT)0x8009030DL) +# define SEC_E_UNKNOWN_CREDENTIALS ((HRESULT)0x8009030DL) #endif #ifndef SEC_E_NO_CREDENTIALS -# define SEC_E_NO_CREDENTIALS ((HRESULT)0x8009030EL) +# define SEC_E_NO_CREDENTIALS ((HRESULT)0x8009030EL) #endif #ifndef SEC_E_MESSAGE_ALTERED -# define SEC_E_MESSAGE_ALTERED ((HRESULT)0x8009030FL) +# define SEC_E_MESSAGE_ALTERED ((HRESULT)0x8009030FL) #endif #ifndef SEC_E_OUT_OF_SEQUENCE -# define SEC_E_OUT_OF_SEQUENCE ((HRESULT)0x80090310L) +# define SEC_E_OUT_OF_SEQUENCE ((HRESULT)0x80090310L) #endif #ifndef SEC_E_NO_AUTHENTICATING_AUTHORITY -# define SEC_E_NO_AUTHENTICATING_AUTHORITY ((HRESULT)0x80090311L) +# define SEC_E_NO_AUTHENTICATING_AUTHORITY ((HRESULT)0x80090311L) #endif #ifndef SEC_E_BAD_PKGID -# define SEC_E_BAD_PKGID ((HRESULT)0x80090316L) +# define SEC_E_BAD_PKGID ((HRESULT)0x80090316L) #endif #ifndef SEC_E_CONTEXT_EXPIRED -# define SEC_E_CONTEXT_EXPIRED ((HRESULT)0x80090317L) +# define SEC_E_CONTEXT_EXPIRED ((HRESULT)0x80090317L) #endif #ifndef SEC_E_INCOMPLETE_MESSAGE -# define SEC_E_INCOMPLETE_MESSAGE ((HRESULT)0x80090318L) +# define SEC_E_INCOMPLETE_MESSAGE ((HRESULT)0x80090318L) #endif #ifndef SEC_E_INCOMPLETE_CREDENTIALS -# define SEC_E_INCOMPLETE_CREDENTIALS ((HRESULT)0x80090320L) +# define SEC_E_INCOMPLETE_CREDENTIALS ((HRESULT)0x80090320L) #endif #ifndef SEC_E_BUFFER_TOO_SMALL -# define SEC_E_BUFFER_TOO_SMALL ((HRESULT)0x80090321L) +# define SEC_E_BUFFER_TOO_SMALL ((HRESULT)0x80090321L) #endif #ifndef SEC_E_WRONG_PRINCIPAL -# define SEC_E_WRONG_PRINCIPAL ((HRESULT)0x80090322L) +# define SEC_E_WRONG_PRINCIPAL ((HRESULT)0x80090322L) #endif #ifndef SEC_E_TIME_SKEW -# define SEC_E_TIME_SKEW ((HRESULT)0x80090324L) +# define SEC_E_TIME_SKEW ((HRESULT)0x80090324L) #endif #ifndef SEC_E_UNTRUSTED_ROOT -# define SEC_E_UNTRUSTED_ROOT ((HRESULT)0x80090325L) +# define SEC_E_UNTRUSTED_ROOT ((HRESULT)0x80090325L) #endif #ifndef SEC_E_ILLEGAL_MESSAGE -# define SEC_E_ILLEGAL_MESSAGE ((HRESULT)0x80090326L) +# define SEC_E_ILLEGAL_MESSAGE ((HRESULT)0x80090326L) #endif #ifndef SEC_E_CERT_UNKNOWN -# define SEC_E_CERT_UNKNOWN ((HRESULT)0x80090327L) +# define SEC_E_CERT_UNKNOWN ((HRESULT)0x80090327L) #endif #ifndef SEC_E_CERT_EXPIRED -# define SEC_E_CERT_EXPIRED ((HRESULT)0x80090328L) +# define SEC_E_CERT_EXPIRED ((HRESULT)0x80090328L) #endif #ifndef SEC_E_ENCRYPT_FAILURE -# define SEC_E_ENCRYPT_FAILURE ((HRESULT)0x80090329L) +# define SEC_E_ENCRYPT_FAILURE ((HRESULT)0x80090329L) #endif #ifndef SEC_E_DECRYPT_FAILURE -# define SEC_E_DECRYPT_FAILURE ((HRESULT)0x80090330L) +# define SEC_E_DECRYPT_FAILURE ((HRESULT)0x80090330L) #endif #ifndef SEC_E_ALGORITHM_MISMATCH -# define SEC_E_ALGORITHM_MISMATCH ((HRESULT)0x80090331L) +# define SEC_E_ALGORITHM_MISMATCH ((HRESULT)0x80090331L) #endif #ifndef SEC_E_SECURITY_QOS_FAILED -# define SEC_E_SECURITY_QOS_FAILED ((HRESULT)0x80090332L) +# define SEC_E_SECURITY_QOS_FAILED ((HRESULT)0x80090332L) #endif #ifndef SEC_E_UNFINISHED_CONTEXT_DELETED -# define SEC_E_UNFINISHED_CONTEXT_DELETED ((HRESULT)0x80090333L) +# define SEC_E_UNFINISHED_CONTEXT_DELETED ((HRESULT)0x80090333L) #endif #ifndef SEC_E_NO_TGT_REPLY -# define SEC_E_NO_TGT_REPLY ((HRESULT)0x80090334L) +# define SEC_E_NO_TGT_REPLY ((HRESULT)0x80090334L) #endif #ifndef SEC_E_NO_IP_ADDRESSES -# define SEC_E_NO_IP_ADDRESSES ((HRESULT)0x80090335L) +# define SEC_E_NO_IP_ADDRESSES ((HRESULT)0x80090335L) #endif #ifndef SEC_E_WRONG_CREDENTIAL_HANDLE -# define SEC_E_WRONG_CREDENTIAL_HANDLE ((HRESULT)0x80090336L) +# define SEC_E_WRONG_CREDENTIAL_HANDLE ((HRESULT)0x80090336L) #endif #ifndef SEC_E_CRYPTO_SYSTEM_INVALID -# define SEC_E_CRYPTO_SYSTEM_INVALID ((HRESULT)0x80090337L) +# define SEC_E_CRYPTO_SYSTEM_INVALID ((HRESULT)0x80090337L) #endif #ifndef SEC_E_MAX_REFERRALS_EXCEEDED -# define SEC_E_MAX_REFERRALS_EXCEEDED ((HRESULT)0x80090338L) +# define SEC_E_MAX_REFERRALS_EXCEEDED ((HRESULT)0x80090338L) #endif #ifndef SEC_E_MUST_BE_KDC -# define SEC_E_MUST_BE_KDC ((HRESULT)0x80090339L) +# define SEC_E_MUST_BE_KDC ((HRESULT)0x80090339L) #endif #ifndef SEC_E_STRONG_CRYPTO_NOT_SUPPORTED -# define SEC_E_STRONG_CRYPTO_NOT_SUPPORTED ((HRESULT)0x8009033AL) +# define SEC_E_STRONG_CRYPTO_NOT_SUPPORTED ((HRESULT)0x8009033AL) #endif #ifndef SEC_E_TOO_MANY_PRINCIPALS -# define SEC_E_TOO_MANY_PRINCIPALS ((HRESULT)0x8009033BL) +# define SEC_E_TOO_MANY_PRINCIPALS ((HRESULT)0x8009033BL) #endif #ifndef SEC_E_NO_PA_DATA -# define SEC_E_NO_PA_DATA ((HRESULT)0x8009033CL) +# define SEC_E_NO_PA_DATA ((HRESULT)0x8009033CL) #endif #ifndef SEC_E_PKINIT_NAME_MISMATCH -# define SEC_E_PKINIT_NAME_MISMATCH ((HRESULT)0x8009033DL) +# define SEC_E_PKINIT_NAME_MISMATCH ((HRESULT)0x8009033DL) #endif #ifndef SEC_E_SMARTCARD_LOGON_REQUIRED -# define SEC_E_SMARTCARD_LOGON_REQUIRED ((HRESULT)0x8009033EL) +# define SEC_E_SMARTCARD_LOGON_REQUIRED ((HRESULT)0x8009033EL) #endif #ifndef SEC_E_SHUTDOWN_IN_PROGRESS -# define SEC_E_SHUTDOWN_IN_PROGRESS ((HRESULT)0x8009033FL) +# define SEC_E_SHUTDOWN_IN_PROGRESS ((HRESULT)0x8009033FL) #endif #ifndef SEC_E_KDC_INVALID_REQUEST -# define SEC_E_KDC_INVALID_REQUEST ((HRESULT)0x80090340L) +# define SEC_E_KDC_INVALID_REQUEST ((HRESULT)0x80090340L) #endif #ifndef SEC_E_KDC_UNABLE_TO_REFER -# define SEC_E_KDC_UNABLE_TO_REFER ((HRESULT)0x80090341L) +# define SEC_E_KDC_UNABLE_TO_REFER ((HRESULT)0x80090341L) #endif #ifndef SEC_E_KDC_UNKNOWN_ETYPE -# define SEC_E_KDC_UNKNOWN_ETYPE ((HRESULT)0x80090342L) +# define SEC_E_KDC_UNKNOWN_ETYPE ((HRESULT)0x80090342L) #endif #ifndef SEC_E_UNSUPPORTED_PREAUTH -# define SEC_E_UNSUPPORTED_PREAUTH ((HRESULT)0x80090343L) +# define SEC_E_UNSUPPORTED_PREAUTH ((HRESULT)0x80090343L) #endif #ifndef SEC_E_DELEGATION_REQUIRED -# define SEC_E_DELEGATION_REQUIRED ((HRESULT)0x80090345L) +# define SEC_E_DELEGATION_REQUIRED ((HRESULT)0x80090345L) #endif #ifndef SEC_E_BAD_BINDINGS -# define SEC_E_BAD_BINDINGS ((HRESULT)0x80090346L) +# define SEC_E_BAD_BINDINGS ((HRESULT)0x80090346L) #endif #ifndef SEC_E_MULTIPLE_ACCOUNTS -# define SEC_E_MULTIPLE_ACCOUNTS ((HRESULT)0x80090347L) +# define SEC_E_MULTIPLE_ACCOUNTS ((HRESULT)0x80090347L) #endif #ifndef SEC_E_NO_KERB_KEY -# define SEC_E_NO_KERB_KEY ((HRESULT)0x80090348L) +# define SEC_E_NO_KERB_KEY ((HRESULT)0x80090348L) #endif #ifndef SEC_E_CERT_WRONG_USAGE -# define SEC_E_CERT_WRONG_USAGE ((HRESULT)0x80090349L) +# define SEC_E_CERT_WRONG_USAGE ((HRESULT)0x80090349L) #endif #ifndef SEC_E_DOWNGRADE_DETECTED -# define SEC_E_DOWNGRADE_DETECTED ((HRESULT)0x80090350L) +# define SEC_E_DOWNGRADE_DETECTED ((HRESULT)0x80090350L) #endif #ifndef SEC_E_SMARTCARD_CERT_REVOKED -# define SEC_E_SMARTCARD_CERT_REVOKED ((HRESULT)0x80090351L) +# define SEC_E_SMARTCARD_CERT_REVOKED ((HRESULT)0x80090351L) #endif #ifndef SEC_E_ISSUING_CA_UNTRUSTED -# define SEC_E_ISSUING_CA_UNTRUSTED ((HRESULT)0x80090352L) +# define SEC_E_ISSUING_CA_UNTRUSTED ((HRESULT)0x80090352L) #endif #ifndef SEC_E_REVOCATION_OFFLINE_C -# define SEC_E_REVOCATION_OFFLINE_C ((HRESULT)0x80090353L) +# define SEC_E_REVOCATION_OFFLINE_C ((HRESULT)0x80090353L) #endif #ifndef SEC_E_PKINIT_CLIENT_FAILURE -# define SEC_E_PKINIT_CLIENT_FAILURE ((HRESULT)0x80090354L) +# define SEC_E_PKINIT_CLIENT_FAILURE ((HRESULT)0x80090354L) #endif #ifndef SEC_E_SMARTCARD_CERT_EXPIRED -# define SEC_E_SMARTCARD_CERT_EXPIRED ((HRESULT)0x80090355L) +# define SEC_E_SMARTCARD_CERT_EXPIRED ((HRESULT)0x80090355L) #endif #ifndef SEC_E_NO_S4U_PROT_SUPPORT -# define SEC_E_NO_S4U_PROT_SUPPORT ((HRESULT)0x80090356L) +# define SEC_E_NO_S4U_PROT_SUPPORT ((HRESULT)0x80090356L) #endif #ifndef SEC_E_CROSSREALM_DELEGATION_FAILURE -# define SEC_E_CROSSREALM_DELEGATION_FAILURE ((HRESULT)0x80090357L) +# define SEC_E_CROSSREALM_DELEGATION_FAILURE ((HRESULT)0x80090357L) #endif #ifndef SEC_E_REVOCATION_OFFLINE_KDC -# define SEC_E_REVOCATION_OFFLINE_KDC ((HRESULT)0x80090358L) +# define SEC_E_REVOCATION_OFFLINE_KDC ((HRESULT)0x80090358L) #endif #ifndef SEC_E_ISSUING_CA_UNTRUSTED_KDC -# define SEC_E_ISSUING_CA_UNTRUSTED_KDC ((HRESULT)0x80090359L) +# define SEC_E_ISSUING_CA_UNTRUSTED_KDC ((HRESULT)0x80090359L) #endif #ifndef SEC_E_KDC_CERT_EXPIRED -# define SEC_E_KDC_CERT_EXPIRED ((HRESULT)0x8009035AL) +# define SEC_E_KDC_CERT_EXPIRED ((HRESULT)0x8009035AL) #endif #ifndef SEC_E_KDC_CERT_REVOKED -# define SEC_E_KDC_CERT_REVOKED ((HRESULT)0x8009035BL) +# define SEC_E_KDC_CERT_REVOKED ((HRESULT)0x8009035BL) #endif #ifndef SEC_E_INVALID_PARAMETER -# define SEC_E_INVALID_PARAMETER ((HRESULT)0x8009035DL) +# define SEC_E_INVALID_PARAMETER ((HRESULT)0x8009035DL) #endif #ifndef SEC_E_DELEGATION_POLICY -# define SEC_E_DELEGATION_POLICY ((HRESULT)0x8009035EL) +# define SEC_E_DELEGATION_POLICY ((HRESULT)0x8009035EL) #endif #ifndef SEC_E_POLICY_NLTM_ONLY -# define SEC_E_POLICY_NLTM_ONLY ((HRESULT)0x8009035FL) +# define SEC_E_POLICY_NLTM_ONLY ((HRESULT)0x8009035FL) #endif #ifndef SEC_I_CONTINUE_NEEDED -# define SEC_I_CONTINUE_NEEDED ((HRESULT)0x00090312L) +# define SEC_I_CONTINUE_NEEDED ((HRESULT)0x00090312L) #endif #ifndef SEC_I_COMPLETE_NEEDED -# define SEC_I_COMPLETE_NEEDED ((HRESULT)0x00090313L) +# define SEC_I_COMPLETE_NEEDED ((HRESULT)0x00090313L) #endif #ifndef SEC_I_COMPLETE_AND_CONTINUE -# define SEC_I_COMPLETE_AND_CONTINUE ((HRESULT)0x00090314L) +# define SEC_I_COMPLETE_AND_CONTINUE ((HRESULT)0x00090314L) #endif #ifndef SEC_I_LOCAL_LOGON -# define SEC_I_LOCAL_LOGON ((HRESULT)0x00090315L) +# define SEC_I_LOCAL_LOGON ((HRESULT)0x00090315L) #endif #ifndef SEC_I_CONTEXT_EXPIRED -# define SEC_I_CONTEXT_EXPIRED ((HRESULT)0x00090317L) +# define SEC_I_CONTEXT_EXPIRED ((HRESULT)0x00090317L) #endif #ifndef SEC_I_INCOMPLETE_CREDENTIALS -# define SEC_I_INCOMPLETE_CREDENTIALS ((HRESULT)0x00090320L) +# define SEC_I_INCOMPLETE_CREDENTIALS ((HRESULT)0x00090320L) #endif #ifndef SEC_I_RENEGOTIATE -# define SEC_I_RENEGOTIATE ((HRESULT)0x00090321L) +# define SEC_I_RENEGOTIATE ((HRESULT)0x00090321L) #endif #ifndef SEC_I_NO_LSA_CONTEXT -# define SEC_I_NO_LSA_CONTEXT ((HRESULT)0x00090323L) +# define SEC_I_NO_LSA_CONTEXT ((HRESULT)0x00090323L) #endif #ifndef SEC_I_SIGNATURE_NEEDED -# define SEC_I_SIGNATURE_NEEDED ((HRESULT)0x0009035CL) +# define SEC_I_SIGNATURE_NEEDED ((HRESULT)0x0009035CL) #endif #ifdef UNICODE @@ -331,12 +304,5 @@ extern PSecurityFunctionTable s_pSecFn; (unsigned long)SEC_WINNT_AUTH_IDENTITY_ANSI #endif -/* - * Definitions required from ntsecapi.h are directly provided below this point - * to avoid including ntsecapi.h due to a conflict with OpenSSL's safestack.h - */ -#define KERB_WRAP_NO_ENCRYPT 0x80000001 - #endif /* USE_WINDOWS_SSPI */ - #endif /* HEADER_CURL_SSPI_H */ diff --git a/lib/curl_threads.c b/lib/curl_threads.c index 5b70139..d40e024 100644 --- a/lib/curl_threads.c +++ b/lib/curl_threads.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -123,12 +123,7 @@ void Curl_thread_destroy(curl_thread_t hnd) int Curl_thread_join(curl_thread_t *hnd) { -#if !defined(_WIN32_WINNT) || !defined(_WIN32_WINNT_VISTA) || \ - (_WIN32_WINNT < _WIN32_WINNT_VISTA) int ret = (WaitForSingleObject(*hnd, INFINITE) == WAIT_OBJECT_0); -#else - int ret = (WaitForSingleObjectEx(*hnd, INFINITE, FALSE) == WAIT_OBJECT_0); -#endif Curl_thread_destroy(*hnd); diff --git a/lib/curl_threads.h b/lib/curl_threads.h index 0f3191a..6457cbb 100644 --- a/lib/curl_threads.h +++ b/lib/curl_threads.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2010, Daniel Stenberg, , 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,12 +37,7 @@ # define curl_mutex_t CRITICAL_SECTION # define curl_thread_t HANDLE # define curl_thread_t_null (HANDLE)0 -# if !defined(_WIN32_WINNT) || !defined(_WIN32_WINNT_VISTA) || \ - (_WIN32_WINNT < _WIN32_WINNT_VISTA) -# define Curl_mutex_init(m) InitializeCriticalSection(m) -# else -# define Curl_mutex_init(m) InitializeCriticalSectionEx(m, 0, 1) -# endif +# define Curl_mutex_init(m) InitializeCriticalSection(m) # define Curl_mutex_acquire(m) EnterCriticalSection(m) # define Curl_mutex_release(m) LeaveCriticalSection(m) # define Curl_mutex_destroy(m) DeleteCriticalSection(m) diff --git a/lib/easy.c b/lib/easy.c index 619312b..160712e 100644 --- a/lib/easy.c +++ b/lib/easy.c @@ -74,7 +74,6 @@ #include "conncache.h" #include "multiif.h" #include "sigpipe.h" -#include "ssh.h" #define _MPRINTF_REPLACE /* use our functions only */ #include @@ -137,9 +136,9 @@ static CURLcode win32_init(void) #ifdef USE_WINDOWS_SSPI { - CURLcode result = Curl_sspi_global_init(); - if(result) - return result; + CURLcode err = Curl_sspi_global_init(); + if(err != CURLE_OK) + return err; } #endif @@ -244,7 +243,7 @@ CURLcode curl_global_init(long flags) } if(flags & CURL_GLOBAL_WIN32) - if(win32_init()) { + if(win32_init() != CURLE_OK) { DEBUGF(fprintf(stderr, "Error: win32_init failed\n")); return CURLE_FAILED_INIT; } @@ -266,7 +265,7 @@ CURLcode curl_global_init(long flags) idna_init(); #endif - if(Curl_resolver_global_init()) { + if(Curl_resolver_global_init() != CURLE_OK) { DEBUGF(fprintf(stderr, "Error: resolver_global_init failed\n")); return CURLE_FAILED_INIT; } @@ -294,7 +293,7 @@ CURLcode curl_global_init_mem(long flags, curl_malloc_callback m, curl_free_callback f, curl_realloc_callback r, curl_strdup_callback s, curl_calloc_callback c) { - CURLcode result = CURLE_OK; + CURLcode code = CURLE_OK; /* Invalid input, return immediately */ if(!m || !f || !r || !s || !c) @@ -309,8 +308,8 @@ CURLcode curl_global_init_mem(long flags, curl_malloc_callback m, } /* Call the actual init function first */ - result = curl_global_init(flags); - if(!result) { + code = curl_global_init(flags); + if(code == CURLE_OK) { Curl_cmalloc = m; Curl_cfree = f; Curl_cstrdup = s; @@ -318,7 +317,7 @@ CURLcode curl_global_init_mem(long flags, curl_malloc_callback m, Curl_ccalloc = c; } - return result; + return code; } /** @@ -358,13 +357,13 @@ void curl_global_cleanup(void) */ CURL *curl_easy_init(void) { - CURLcode result; + CURLcode res; struct SessionHandle *data; /* Make sure we inited the global SSL stuff */ if(!initialized) { - result = curl_global_init(CURL_GLOBAL_DEFAULT); - if(result) { + res = curl_global_init(CURL_GLOBAL_DEFAULT); + if(res) { /* something in the global init failed, return nothing */ DEBUGF(fprintf(stderr, "Error: curl_global_init failed\n")); return NULL; @@ -372,8 +371,8 @@ CURL *curl_easy_init(void) } /* We use curl_open() with undefined URL so far */ - result = Curl_open(&data); - if(result) { + res = Curl_open(&data); + if(res != CURLE_OK) { DEBUGF(fprintf(stderr, "Error: Curl_open failed\n")); return NULL; } @@ -391,17 +390,17 @@ CURLcode curl_easy_setopt(CURL *curl, CURLoption tag, ...) { va_list arg; struct SessionHandle *data = curl; - CURLcode result; + CURLcode ret; if(!curl) return CURLE_BAD_FUNCTION_ARGUMENT; va_start(arg, tag); - result = Curl_setopt(data, tag, arg); + ret = Curl_setopt(data, tag, arg); va_end(arg); - return result; + return ret; } #ifdef CURLDEBUG @@ -491,10 +490,6 @@ static int events_socket(CURL *easy, /* easy handle */ struct events *ev = userp; struct socketmonitor *m; struct socketmonitor *prev=NULL; - -#if defined(CURL_DISABLE_VERBOSE_STRINGS) - (void) easy; -#endif (void)socketp; m = ev->list; @@ -575,7 +570,7 @@ static CURLcode wait_or_timeout(struct Curl_multi *multi, struct events *ev) { bool done = FALSE; CURLMcode mcode; - CURLcode result = CURLE_OK; + CURLcode rc = CURLE_OK; while(!done) { CURLMsg *msg; @@ -635,9 +630,6 @@ static CURLcode wait_or_timeout(struct Curl_multi *multi, struct events *ev) ev->ms += curlx_tvdiff(after, before); } - else - return CURLE_RECV_ERROR; - if(mcode) return CURLE_URL_MALFORMAT; /* TODO: return a proper error! */ @@ -645,12 +637,12 @@ static CURLcode wait_or_timeout(struct Curl_multi *multi, struct events *ev) second argument */ msg = curl_multi_info_read(multi, &pollrc); if(msg) { - result = msg->data.result; + rc = msg->data.result; done = TRUE; } } - return result; + return rc; } @@ -676,7 +668,7 @@ static CURLcode easy_transfer(CURLM *multi) { bool done = FALSE; CURLMcode mcode = CURLM_OK; - CURLcode result = CURLE_OK; + CURLcode code = CURLE_OK; struct timeval before; int without_fds = 0; /* count number of consecutive returns from curl_multi_wait() without any filedescriptors */ @@ -691,7 +683,7 @@ static CURLcode easy_transfer(CURLM *multi) if(mcode == CURLM_OK) { if(ret == -1) { /* poll() failed not on EINTR, indicate a network problem */ - result = CURLE_RECV_ERROR; + code = CURLE_RECV_ERROR; break; } else if(ret == 0) { @@ -722,7 +714,7 @@ static CURLcode easy_transfer(CURLM *multi) int rc; CURLMsg *msg = curl_multi_info_read(multi, &rc); if(msg) { - result = msg->data.result; + code = msg->data.result; done = TRUE; } } @@ -736,7 +728,7 @@ static CURLcode easy_transfer(CURLM *multi) CURLE_BAD_FUNCTION_ARGUMENT; } - return result; + return code; } @@ -761,7 +753,7 @@ static CURLcode easy_perform(struct SessionHandle *data, bool events) { CURLM *multi; CURLMcode mcode; - CURLcode result = CURLE_OK; + CURLcode code = CURLE_OK; SIGPIPE_VARIABLE(pipe_st); if(!data) @@ -802,7 +794,7 @@ static CURLcode easy_perform(struct SessionHandle *data, bool events) data->multi = multi; /* run the transfer */ - result = events ? easy_events(multi) : easy_transfer(multi); + code = events ? easy_events(multi) : easy_transfer(multi); /* ignoring the return code isn't nice, but atm we can't really handle a failure here, room for future improvement! */ @@ -811,7 +803,7 @@ static CURLcode easy_perform(struct SessionHandle *data, bool events) sigpipe_restore(&pipe_st); /* The multi handle is kept alive, owned by the easy handle */ - return result; + return code; } @@ -862,16 +854,16 @@ CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...) { va_list arg; void *paramp; - CURLcode result; + CURLcode ret; struct SessionHandle *data = (struct SessionHandle *)curl; va_start(arg, info); paramp = va_arg(arg, void *); - result = Curl_getinfo(data, info, paramp); + ret = Curl_getinfo(data, info, paramp); va_end(arg); - return result; + return ret; } /* @@ -898,7 +890,7 @@ CURL *curl_easy_duphandle(CURL *incurl) outcurl->state.headersize = HEADERSIZE; /* copy all userdefined values */ - if(Curl_dupset(outcurl, data)) + if(Curl_dupset(outcurl, data) != CURLE_OK) goto fail; /* the connection cache is setup on demand */ @@ -944,7 +936,7 @@ CURL *curl_easy_duphandle(CURL *incurl) /* Clone the resolver handle, if present, for the new handle */ if(Curl_resolver_duphandle(&outcurl->state.resolver, - data->state.resolver)) + data->state.resolver) != CURLE_OK) goto fail; Curl_convert_setup(outcurl); @@ -1026,15 +1018,73 @@ CURLcode curl_easy_pause(CURL *curl, int action) /* we have a buffer for sending that we now seem to be able to deliver since the receive pausing is lifted! */ - /* 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 + /* get the pointer, type and length in local copies 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; - + char *freewrite = tempwrite; /* store this pointer to free it later */ + size_t tempsize = data->state.tempwritesize; + int temptype = data->state.tempwritetype; + size_t chunklen; + + /* clear tempwrite here just to make sure it gets cleared if there's no + further use of it, and make sure we don't clear it after the function + invoke as it may have been set to a new value by then */ data->state.tempwrite = NULL; - result = Curl_client_chop_write(data->easy_conn, data->state.tempwritetype, - tempwrite, data->state.tempwritesize); - free(tempwrite); + + /* since the write callback API is define to never exceed + CURL_MAX_WRITE_SIZE bytes in a single call, and since we may in fact + have more data than that in our buffer here, we must loop sending the + data in multiple calls until there's no data left or we get another + pause returned. + + A tricky part is that the function we call will "buffer" the data + itself when it pauses on a particular buffer, so we may need to do some + extra trickery if we get a pause return here. + */ + do { + chunklen = (tempsize > CURL_MAX_WRITE_SIZE)?CURL_MAX_WRITE_SIZE:tempsize; + + result = Curl_client_write(data->easy_conn, + temptype, tempwrite, chunklen); + if(result) + /* failures abort the loop at once */ + break; + + if(data->state.tempwrite && (tempsize - chunklen)) { + /* Ouch, the reading is again paused and the block we send is now + "cached". If this is the final chunk we can leave it like this, but + if we have more chunks that are cached after this, we need to free + the newly cached one and put back a version that is truly the entire + contents that is saved for later + */ + char *newptr; + + /* note that tempsize is still the size as before the callback was + used, and thus the whole piece of data to keep */ + newptr = realloc(data->state.tempwrite, tempsize); + + if(!newptr) { + free(data->state.tempwrite); /* free old area */ + data->state.tempwrite = NULL; + result = CURLE_OUT_OF_MEMORY; + /* tempwrite will be freed further down */ + break; + } + data->state.tempwrite = newptr; /* store new pointer */ + memcpy(newptr, tempwrite, tempsize); + data->state.tempwritesize = tempsize; /* store new size */ + /* tempwrite will be freed further down */ + break; /* go back to pausing until further notice */ + } + else { + tempsize -= chunklen; /* left after the call above */ + tempwrite += chunklen; /* advance the pointer */ + } + + } while((result == CURLE_OK) && tempsize); + + free(freewrite); /* this is unconditionally no longer used */ } /* if there's no error and we're not pausing both directions, we want @@ -1079,20 +1129,20 @@ static CURLcode easy_connection(struct SessionHandle *data, CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen, size_t *n) { curl_socket_t sfd; - CURLcode result; + CURLcode ret; ssize_t n1; struct connectdata *c; struct SessionHandle *data = (struct SessionHandle *)curl; - result = easy_connection(data, &sfd, &c); - if(result) - return result; + ret = easy_connection(data, &sfd, &c); + if(ret) + return ret; *n = 0; - result = Curl_read(c, sfd, buffer, buflen, &n1); + ret = Curl_read(c, sfd, buffer, buflen, &n1); - if(result) - return result; + if(ret != CURLE_OK) + return ret; *n = (size_t)n1; @@ -1107,26 +1157,26 @@ CURLcode curl_easy_send(CURL *curl, const void *buffer, size_t buflen, size_t *n) { curl_socket_t sfd; - CURLcode result; + CURLcode ret; ssize_t n1; struct connectdata *c = NULL; struct SessionHandle *data = (struct SessionHandle *)curl; - result = easy_connection(data, &sfd, &c); - if(result) - return result; + ret = easy_connection(data, &sfd, &c); + if(ret) + return ret; *n = 0; - result = Curl_write(c, sfd, buffer, buflen, &n1); + ret = Curl_write(c, sfd, buffer, buflen, &n1); if(n1 == -1) return CURLE_SEND_ERROR; /* detect EAGAIN */ - if(!result && !n1) + if((CURLE_OK == ret) && (0 == n1)) return CURLE_AGAIN; *n = (size_t)n1; - return result; + return ret; } diff --git a/lib/escape.c b/lib/escape.c index 9923e64..d7f8a8f 100644 --- a/lib/escape.c +++ b/lib/escape.c @@ -87,7 +87,7 @@ char *curl_easy_escape(CURL *handle, const char *string, int inlength) size_t newlen = alloc; size_t strindex=0; size_t length; - CURLcode result; + CURLcode res; ns = malloc(alloc); if(!ns) @@ -115,8 +115,8 @@ char *curl_easy_escape(CURL *handle, const char *string, int inlength) } } - result = Curl_convert_to_network(handle, &in, 1); - if(result) { + res = Curl_convert_to_network(handle, &in, 1); + if(res) { /* Curl_convert_to_network calls failf if unsuccessful */ free(ns); return NULL; @@ -152,7 +152,7 @@ CURLcode Curl_urldecode(struct SessionHandle *data, unsigned char in; size_t strindex=0; unsigned long hex; - CURLcode result; + CURLcode res; if(!ns) return CURLE_OUT_OF_MEMORY; @@ -172,17 +172,16 @@ CURLcode Curl_urldecode(struct SessionHandle *data, in = curlx_ultouc(hex); /* this long is never bigger than 255 anyway */ - result = Curl_convert_from_network(data, &in, 1); - if(result) { + res = Curl_convert_from_network(data, &in, 1); + if(res) { /* Curl_convert_from_network calls failf if unsuccessful */ free(ns); - return result; + return res; } string+=2; alloc-=2; } - if(reject_ctrl && (in < 0x20)) { free(ns); return CURLE_URL_MALFORMAT; diff --git a/lib/file.c b/lib/file.c index dd2c564..73df42e 100644 --- a/lib/file.c +++ b/lib/file.c @@ -196,9 +196,8 @@ static CURLcode file_connect(struct connectdata *conn, bool *done) int i; char *actual_path; #endif - int real_path_len; - real_path = curl_easy_unescape(data, data->state.path, 0, &real_path_len); + real_path = curl_easy_unescape(data, data->state.path, 0, NULL); if(!real_path) return CURLE_OUT_OF_MEMORY; @@ -223,23 +222,16 @@ static CURLcode file_connect(struct connectdata *conn, bool *done) (actual_path[2] == ':' || actual_path[2] == '|')) { actual_path[2] = ':'; actual_path++; - real_path_len--; } /* change path separators from '/' to '\\' for DOS, Windows and OS/2 */ - for(i=0; i < real_path_len; ++i) + for(i=0; actual_path[i] != '\0'; ++i) if(actual_path[i] == '/') actual_path[i] = '\\'; - else if(!actual_path[i]) /* binary zero */ - return CURLE_URL_MALFORMAT; fd = open_readonly(actual_path, O_RDONLY|O_BINARY); file->path = actual_path; #else - if(memchr(real_path, 0, real_path_len)) - /* binary zeroes indicate foul play */ - return CURLE_URL_MALFORMAT; - fd = open_readonly(real_path, O_RDONLY); file->path = real_path; #endif @@ -303,7 +295,7 @@ static CURLcode file_upload(struct connectdata *conn) const char *dir = strchr(file->path, DIRSEP); int fd; int mode; - CURLcode result = CURLE_OK; + CURLcode res=CURLE_OK; struct SessionHandle *data = conn->data; char *buf = data->state.buffer; size_t nread; @@ -359,10 +351,10 @@ static CURLcode file_upload(struct connectdata *conn) data->state.resume_from = (curl_off_t)file_stat.st_size; } - while(!result) { + while(res == CURLE_OK) { int readcount; - result = Curl_fillreadbuffer(conn, BUFSIZE, &readcount); - if(result) + res = Curl_fillreadbuffer(conn, BUFSIZE, &readcount); + if(res) break; if(readcount <= 0) /* fix questionable compare error. curlvms */ @@ -389,7 +381,7 @@ static CURLcode file_upload(struct connectdata *conn) /* write the data to the target */ nwrite = write(fd, buf2, nread); if(nwrite != nread) { - result = CURLE_SEND_ERROR; + res = CURLE_SEND_ERROR; break; } @@ -398,16 +390,16 @@ static CURLcode file_upload(struct connectdata *conn) Curl_pgrsSetUploadCounter(data, bytecount); if(Curl_pgrsUpdate(conn)) - result = CURLE_ABORTED_BY_CALLBACK; + res = CURLE_ABORTED_BY_CALLBACK; else - result = Curl_speedcheck(data, now); + res = Curl_speedcheck(data, now); } - if(!result && Curl_pgrsUpdate(conn)) - result = CURLE_ABORTED_BY_CALLBACK; + if(!res && Curl_pgrsUpdate(conn)) + res = CURLE_ABORTED_BY_CALLBACK; close(fd); - return result; + return res; } /* @@ -425,7 +417,7 @@ static CURLcode file_do(struct connectdata *conn, bool *done) are supported. This means that files on remotely mounted directories (via NFS, Samba, NT sharing) can be accessed through a file:// URL */ - CURLcode result = CURLE_OK; + CURLcode res = CURLE_OK; 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' */ @@ -472,6 +464,7 @@ static CURLcode file_do(struct connectdata *conn, bool *done) information. Which for FILE can't be much more than the file size and date. */ if(data->set.opt_no_body && data->set.include_header && fstated) { + CURLcode result; snprintf(buf, sizeof(data->state.buffer), "Content-Length: %" CURL_FORMAT_CURL_OFF_T "\r\n", expected_size); result = Curl_client_write(conn, CLIENTWRITE_BOTH, buf, 0); @@ -553,7 +546,7 @@ static CURLcode file_do(struct connectdata *conn, bool *done) Curl_pgrsTime(data, TIMER_STARTTRANSFER); - while(!result) { + while(res == CURLE_OK) { /* Don't fill a whole buffer if we want less than all data */ size_t bytestoread = (expected_size < CURL_OFF_T_C(BUFSIZE) - CURL_OFF_T_C(1)) ? @@ -570,21 +563,21 @@ static CURLcode file_do(struct connectdata *conn, bool *done) bytecount += nread; expected_size -= nread; - result = Curl_client_write(conn, CLIENTWRITE_BODY, buf, nread); - if(result) - return result; + res = Curl_client_write(conn, CLIENTWRITE_BODY, buf, nread); + if(res) + return res; Curl_pgrsSetDownloadCounter(data, bytecount); if(Curl_pgrsUpdate(conn)) - result = CURLE_ABORTED_BY_CALLBACK; + res = CURLE_ABORTED_BY_CALLBACK; else - result = Curl_speedcheck(data, now); + res = Curl_speedcheck(data, now); } if(Curl_pgrsUpdate(conn)) - result = CURLE_ABORTED_BY_CALLBACK; + res = CURLE_ABORTED_BY_CALLBACK; - return result; + return res; } #endif diff --git a/lib/formdata.c b/lib/formdata.c index 73d3b6d..3260928 100644 --- a/lib/formdata.c +++ b/lib/formdata.c @@ -24,7 +24,7 @@ #include -#ifndef CURL_DISABLE_HTTP +#if !defined(CURL_DISABLE_HTTP) || defined(USE_SSLEAY) #if defined(HAVE_LIBGEN_H) && defined(HAVE_BASENAME) #include @@ -36,7 +36,6 @@ #include "strequal.h" #include "curl_memory.h" #include "sendf.h" -#include "strdup.h" #define _MPRINTF_REPLACE /* use our functions only */ #include @@ -44,6 +43,10 @@ /* The last #include file should be: */ #include "memdebug.h" +#endif /* !defined(CURL_DISABLE_HTTP) || defined(USE_SSLEAY) */ + +#ifndef CURL_DISABLE_HTTP + #ifndef HAVE_BASENAME static char *Curl_basename(char *path); #define basename(x) Curl_basename((x)) @@ -211,6 +214,46 @@ static const char *ContentTypeForFilename(const char *filename, /*************************************************************************** * + * memdup() + * + * Copies the 'source' data to a newly allocated buffer buffer (that is + * returned). Uses buffer_length if not null, else uses strlen to determine + * the length of the buffer to be copied + * + * Returns the new pointer or NULL on failure. + * + ***************************************************************************/ +static char *memdup(const char *src, size_t buffer_length) +{ + size_t length; + bool add = FALSE; + char *buffer; + + if(buffer_length) + length = buffer_length; + else if(src) { + length = strlen(src); + add = TRUE; + } + else + /* no length and a NULL src pointer! */ + return strdup(""); + + buffer = malloc(length+add); + if(!buffer) + return NULL; /* fail */ + + memcpy(buffer, src, length); + + /* if length unknown do null termination */ + if(add) + buffer[length] = '\0'; + + return buffer; +} + +/*************************************************************************** + * * FormAdd() * * Stores a formpost parameter and builds the appropriate linked list. @@ -639,12 +682,9 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost, (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) { + 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); - } + form->name = memdup(form->name, form->namelength); if(!form->name) { return_value = CURL_FORMADD_MEMORY; break; @@ -653,11 +693,9 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost, } if(!(form->flags & (HTTPPOST_FILENAME | HTTPPOST_READFILE | HTTPPOST_PTRCONTENTS | HTTPPOST_PTRBUFFER | - HTTPPOST_CALLBACK)) && form->value) { + HTTPPOST_CALLBACK)) ) { /* copy value (without strdup; possibly contains null characters) */ - form->value = Curl_memdup(form->value, form->contentslength? - form->contentslength: - strlen(form->value)+1); + form->value = memdup(form->value, form->contentslength); if(!form->value) { return_value = CURL_FORMADD_MEMORY; break; @@ -916,13 +954,13 @@ void Curl_formclean(struct FormData **form_ptr) int curl_formget(struct curl_httppost *form, void *arg, curl_formget_callback append) { - CURLcode result; + CURLcode rc; curl_off_t size; struct FormData *data, *ptr; - result = Curl_getformdata(NULL, &data, form, NULL, &size); - if(result) - return (int)result; + rc = Curl_getformdata(NULL, &data, form, NULL, &size); + if(rc != CURLE_OK) + return (int)rc; for(ptr = data; ptr; ptr = ptr->next) { if((ptr->type == FORM_FILE) || (ptr->type == FORM_CALLBACK)) { @@ -1331,8 +1369,10 @@ CURLcode Curl_getformdata(struct SessionHandle *data, } while((post = post->next) != NULL); /* for each field */ /* end-boundary for everything */ - if(!result) - result = AddFormDataf(&form, &size, "\r\n--%s--\r\n", boundary); + if(CURLE_OK == result) + result = AddFormDataf(&form, &size, + "\r\n--%s--\r\n", + boundary); if(result) { Curl_formclean(&firstform); diff --git a/lib/ftp.c b/lib/ftp.c index 68610f9..4c4396a 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * 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 @@ -157,7 +157,7 @@ static CURLcode ftp_dophase_done(struct connectdata *conn, bool connected); /* easy-to-use macro: */ -#define PPSENDF(x,y,z) if((result = Curl_pp_sendf(x,y,z))) \ +#define PPSENDF(x,y,z) if((result = Curl_pp_sendf(x,y,z)) != CURLE_OK) \ return result @@ -294,10 +294,10 @@ static void freedirs(struct ftp_conn *ftpc) ftpc->dirs = NULL; ftpc->dirdepth = 0; } - Curl_safefree(ftpc->file); - - /* no longer of any use */ - Curl_safefree(ftpc->newhost); + if(ftpc->file) { + free(ftpc->file); + ftpc->file = NULL; + } } /* Returns non-zero if the given string contains CR (\r) or LF (\n), @@ -346,7 +346,7 @@ static CURLcode AcceptServerConnect(struct connectdata *conn) infof(data, "Connection accepted from server\n"); conn->sock[SECONDARYSOCKET] = s; - (void)curlx_nonblock(s, TRUE); /* enable non-blocking */ + curlx_nonblock(s, TRUE); /* enable non-blocking */ conn->sock_accepted[SECONDARYSOCKET] = TRUE; if(data->set.fsockopt) { @@ -541,7 +541,7 @@ static CURLcode AllowServerConnect(struct connectdata *conn, bool *connected) { struct SessionHandle *data = conn->data; long timeout_ms; - CURLcode result = CURLE_OK; + CURLcode ret = CURLE_OK; *connected = FALSE; infof(data, "Preparing for accepting server on data port\n"); @@ -557,22 +557,22 @@ static CURLcode AllowServerConnect(struct connectdata *conn, bool *connected) } /* see if the connection request is already here */ - result = ReceivedServerConnect(conn, connected); - if(result) - return result; + ret = ReceivedServerConnect(conn, connected); + if(ret) + return ret; if(*connected) { - result = AcceptServerConnect(conn); - if(result) - return result; + ret = AcceptServerConnect(conn); + if(ret) + return ret; - result = InitiateTransfer(conn); - if(result) - return result; + ret = InitiateTransfer(conn); + if(ret) + return ret; } else { /* Add timeout to multi handle and break out of the loop */ - if(!result && *connected == FALSE) { + if(ret == CURLE_OK && *connected == FALSE) { if(data->set.accepttimeout > 0) Curl_expire(data, data->set.accepttimeout); else @@ -580,7 +580,7 @@ static CURLcode AllowServerConnect(struct connectdata *conn, bool *connected) } } - return result; + return ret; } /* macro to check for a three-digit ftp status code at the start of the @@ -821,19 +821,12 @@ static void _state(struct connectdata *conn, ) { struct ftp_conn *ftpc = &conn->proto.ftpc; - -#if defined(DEBUGBUILD) - -#if defined(CURL_DISABLE_VERBOSE_STRINGS) - (void) lineno; -#else +#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS) if(ftpc->state != newstate) infof(conn->data, "FTP %p (line %d) state change from %s to %s\n", (void *)ftpc, lineno, ftp_state_names[ftpc->state], ftp_state_names[newstate]); #endif -#endif - ftpc->state = newstate; } @@ -1079,9 +1072,8 @@ static CURLcode ftp_state_use_port(struct connectdata *conn, if(*addr != '\0') { /* attempt to get the address of the given interface name */ - switch(Curl_if2ip(conn->ip_addr->ai_family, - Curl_ipv6_scope(conn->ip_addr->ai_addr), - conn->scope_id, addr, hbuf, sizeof(hbuf))) { + switch(Curl_if2ip(conn->ip_addr->ai_family, conn->scope, addr, + hbuf, sizeof(hbuf))) { case IF2IP_NOT_FOUND: /* not an interface, use the given string as host name instead */ host = addr; @@ -1254,10 +1246,10 @@ static CURLcode ftp_state_use_port(struct connectdata *conn, continue; if((PORT == fcmd) && sa->sa_family != AF_INET) - /* PORT is IPv4 only */ + /* PORT is ipv4 only */ continue; - switch(sa->sa_family) { + switch (sa->sa_family) { case AF_INET: port = ntohs(sa4->sin_port); break; @@ -1537,7 +1529,7 @@ static CURLcode ftp_state_list(struct connectdata *conn) free(cmd); - if(result) + if(result != CURLE_OK) return result; state(conn, FTP_LIST); @@ -1815,13 +1807,6 @@ static CURLcode ftp_state_quote(struct connectdata *conn, static CURLcode ftp_epsv_disable(struct connectdata *conn) { CURLcode result = CURLE_OK; - - if(conn->bits.ipv6) { - /* We can't disable EPSV when doing IPv6, so this is instead a fail */ - failf(conn->data, "Failed EPSV attempt, exiting\n"); - return CURLE_FTP_WEIRD_SERVER_REPLY; - } - infof(conn->data, "Failed EPSV attempt. Disabling EPSV\n"); /* disable it for next transfer */ conn->bits.ftp_use_epsv = FALSE; @@ -1843,15 +1828,9 @@ static CURLcode proxy_magic(struct connectdata *conn, bool *magicdone) { CURLcode result = CURLE_OK; - struct SessionHandle *data = conn->data; - -#if defined(CURL_DISABLE_PROXY) - (void) newhost; - (void) newport; -#endif + struct SessionHandle *data=conn->data; *magicdone = FALSE; - switch(conn->proxytype) { case CURLPROXY_SOCKS5: case CURLPROXY_SOCKS5_HOSTNAME: @@ -1909,7 +1888,6 @@ static CURLcode proxy_magic(struct connectdata *conn, else *magicdone = TRUE; } - return result; } @@ -1924,9 +1902,6 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn, unsigned short connectport; /* the local port connect() should use! */ 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); - if((ftpc->count1 == 0) && (ftpcode == 229)) { /* positive EPSV response */ @@ -1959,10 +1934,18 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn, if(ptr) { ftpc->newport = (unsigned short)(num & 0xffff); - /* use the original host name again */ - ftpc->newhost = strdup(conn->host.name); - if(!ftpc->newhost) - return CURLE_OUT_OF_MEMORY; + if(conn->bits.tunnel_proxy || + conn->proxytype == CURLPROXY_SOCKS5 || + conn->proxytype == CURLPROXY_SOCKS5_HOSTNAME || + conn->proxytype == CURLPROXY_SOCKS4 || + conn->proxytype == CURLPROXY_SOCKS4A) + /* proxy tunnel -> use other host info because ip_addr_str is the + proxy address not the ftp host */ + snprintf(ftpc->newhost, sizeof(ftpc->newhost), "%s", + conn->host.name); + else + /* use the same IP we are already connected to */ + snprintf(ftpc->newhost, NEWHOST_BUFSIZE, "%s", conn->ip_addr_str); } } else @@ -2003,21 +1986,26 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn, /* we got OK from server */ if(data->set.ftp_skip_ip) { - /* told to ignore the remotely given IP but instead use the host we used + /* told to ignore the remotely given IP but instead use the one we used for the control connection */ - infof(data, "Skip %d.%d.%d.%d for data connection, re-use %s instead\n", + infof(data, "Skips %d.%d.%d.%d for data connection, uses %s instead\n", ip[0], ip[1], ip[2], ip[3], - conn->host.name); - - /* use the original host name again */ - ftpc->newhost = strdup(conn->host.name); + conn->ip_addr_str); + if(conn->bits.tunnel_proxy || + conn->proxytype == CURLPROXY_SOCKS5 || + conn->proxytype == CURLPROXY_SOCKS5_HOSTNAME || + conn->proxytype == CURLPROXY_SOCKS4 || + conn->proxytype == CURLPROXY_SOCKS4A) + /* proxy tunnel -> use other host info because ip_addr_str is the + proxy address not the ftp host */ + snprintf(ftpc->newhost, sizeof(ftpc->newhost), "%s", conn->host.name); + else + snprintf(ftpc->newhost, sizeof(ftpc->newhost), "%s", + conn->ip_addr_str); } else - ftpc->newhost = aprintf("%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]); - - if(!ftpc->newhost) - return CURLE_OUT_OF_MEMORY; - + snprintf(ftpc->newhost, sizeof(ftpc->newhost), + "%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]); ftpc->newport = (unsigned short)(((port[0]<<8) + port[1]) & 0xffff); } else if(ftpc->count1 == 0) { @@ -2726,7 +2714,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn) set a valid level */ Curl_sec_request_prot(conn, data->set.str[STRING_KRB_LEVEL]); - if(Curl_sec_login(conn)) + if(Curl_sec_login(conn) != CURLE_OK) infof(data, "Logging in with password in cleartext!\n"); else infof(data, "Authentication successful\n"); @@ -2777,7 +2765,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn) if((ftpcode == 234) || (ftpcode == 334)) { /* Curl_ssl_connect is BLOCKING */ result = Curl_ssl_connect(conn, FIRSTSOCKET); - if(!result) { + if(CURLE_OK == result) { conn->ssl[SECONDARYSOCKET].use = FALSE; /* clear-text data */ result = ftp_state_user(conn); } @@ -2919,7 +2907,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn) if(!ftpc->server_os && dir[0] != '/') { result = Curl_pp_sendf(&ftpc->pp, "%s", "SYST"); - if(result) { + if(result != CURLE_OK) { free(dir); return result; } @@ -2972,7 +2960,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn) if(strequal(os, "OS/400")) { /* Force OS400 name format 1. */ result = Curl_pp_sendf(&ftpc->pp, "%s", "SITE NAMEFMT 1"); - if(result) { + if(result != CURLE_OK) { free(os); return result; } @@ -3748,7 +3736,7 @@ static CURLcode ftp_do_more(struct connectdata *conn, int *completep) return result; } - if(!result && (ftp->transfer != FTPTRANSFER_BODY)) + if((result == CURLE_OK) && (ftp->transfer != FTPTRANSFER_BODY)) /* no data to transfer. FIX: it feels like a kludge to have this here too! */ Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL); @@ -3821,7 +3809,7 @@ static CURLcode init_wc_data(struct connectdata *conn) char *last_slash; char *path = conn->data->state.path; struct WildcardData *wildcard = &(conn->data->wildcard); - CURLcode result = CURLE_OK; + CURLcode ret = CURLE_OK; struct ftp_wc_tmpdata *ftp_tmp; last_slash = strrchr(conn->data->state.path, '/'); @@ -3829,8 +3817,8 @@ static CURLcode init_wc_data(struct connectdata *conn) last_slash++; if(last_slash[0] == '\0') { wildcard->state = CURLWC_CLEAN; - result = ftp_parse_url_path(conn); - return result; + ret = ftp_parse_url_path(conn); + return ret; } else { wildcard->pattern = strdup(last_slash); @@ -3848,8 +3836,8 @@ static CURLcode init_wc_data(struct connectdata *conn) } else { /* only list */ wildcard->state = CURLWC_CLEAN; - result = ftp_parse_url_path(conn); - return result; + ret = ftp_parse_url_path(conn); + return ret; } } @@ -3879,13 +3867,13 @@ static CURLcode init_wc_data(struct connectdata *conn) conn->data->set.ftp_filemethod = FTPFILE_MULTICWD; /* try to parse ftp url */ - result = ftp_parse_url_path(conn); - if(result) { + ret = ftp_parse_url_path(conn); + if(ret) { Curl_safefree(wildcard->pattern); wildcard->tmp_dtor(wildcard->tmp); wildcard->tmp_dtor = ZERO_NULL; wildcard->tmp = NULL; - return result; + return ret; } wildcard->path = strdup(conn->data->state.path); @@ -3914,16 +3902,16 @@ static CURLcode init_wc_data(struct connectdata *conn) static CURLcode wc_statemach(struct connectdata *conn) { struct WildcardData * const wildcard = &(conn->data->wildcard); - CURLcode result = CURLE_OK; + CURLcode ret = CURLE_OK; switch (wildcard->state) { case CURLWC_INIT: - result = init_wc_data(conn); + ret = init_wc_data(conn); if(wildcard->state == CURLWC_CLEAN) /* only listing! */ break; else - wildcard->state = result ? CURLWC_ERROR : CURLWC_MATCHING; + wildcard->state = ret ? CURLWC_ERROR : CURLWC_MATCHING; break; case CURLWC_MATCHING: { @@ -3987,9 +3975,10 @@ static CURLcode wc_statemach(struct connectdata *conn) if(finfo->flags & CURLFINFOFLAG_KNOWN_SIZE) ftpc->known_filesize = finfo->size; - result = ftp_parse_url_path(conn); - if(result) - return result; + ret = ftp_parse_url_path(conn); + if(ret) { + return ret; + } /* we don't need the Curl_fileinfo of first file anymore */ Curl_llist_remove(wildcard->filelist, wildcard->filelist->head, NULL); @@ -4013,11 +4002,11 @@ static CURLcode wc_statemach(struct connectdata *conn) case CURLWC_CLEAN: { struct ftp_wc_tmpdata *ftp_tmp = wildcard->tmp; - result = CURLE_OK; - if(ftp_tmp) - result = Curl_ftp_parselist_geterror(ftp_tmp->parser); - - wildcard->state = result ? CURLWC_ERROR : CURLWC_DONE; + ret = CURLE_OK; + if(ftp_tmp) { + ret = Curl_ftp_parselist_geterror(ftp_tmp->parser); + } + wildcard->state = ret ? CURLWC_ERROR : CURLWC_DONE; } break; case CURLWC_DONE: @@ -4025,7 +4014,7 @@ static CURLcode wc_statemach(struct connectdata *conn) break; } - return result; + return ret; } /*********************************************************************** @@ -4039,31 +4028,31 @@ static CURLcode wc_statemach(struct connectdata *conn) */ static CURLcode ftp_do(struct connectdata *conn, bool *done) { - CURLcode result = CURLE_OK; + CURLcode retcode = CURLE_OK; struct ftp_conn *ftpc = &conn->proto.ftpc; *done = FALSE; /* default to false */ ftpc->wait_data_conn = FALSE; /* default to no such wait */ if(conn->data->set.wildcardmatch) { - result = wc_statemach(conn); + retcode = wc_statemach(conn); if(conn->data->wildcard.state == CURLWC_SKIP || conn->data->wildcard.state == CURLWC_DONE) { /* do not call ftp_regular_transfer */ return CURLE_OK; } - if(result) /* error, loop or skipping the file */ - return result; + if(retcode) /* error, loop or skipping the file */ + return retcode; } else { /* no wildcard FSM needed */ - result = ftp_parse_url_path(conn); - if(result) - return result; + retcode = ftp_parse_url_path(conn); + if(retcode) + return retcode; } - result = ftp_regular_transfer(conn, done); + retcode = ftp_regular_transfer(conn, done); - return result; + return retcode; } @@ -4075,7 +4064,7 @@ CURLcode Curl_ftpsendf(struct connectdata *conn, char s[SBUF_SIZE]; size_t write_len; char *sptr=s; - CURLcode result = CURLE_OK; + CURLcode res = CURLE_OK; #ifdef HAVE_GSSAPI enum protection_level data_sec = conn->data_prot; #endif @@ -4090,23 +4079,23 @@ CURLcode Curl_ftpsendf(struct connectdata *conn, bytes_written=0; - result = Curl_convert_to_network(conn->data, s, write_len); + res = Curl_convert_to_network(conn->data, s, write_len); /* Curl_convert_to_network calls failf if unsuccessful */ - if(result) - return(result); + if(res) + return(res); for(;;) { #ifdef HAVE_GSSAPI conn->data_prot = PROT_CMD; #endif - result = Curl_write(conn, conn->sock[FIRSTSOCKET], sptr, write_len, - &bytes_written); + res = Curl_write(conn, conn->sock[FIRSTSOCKET], sptr, write_len, + &bytes_written); #ifdef HAVE_GSSAPI DEBUGASSERT(data_sec > PROT_NONE && data_sec < PROT_LAST); conn->data_prot = data_sec; #endif - if(result) + if(CURLE_OK != res) break; if(conn->data->set.verbose) @@ -4121,7 +4110,7 @@ CURLcode Curl_ftpsendf(struct connectdata *conn, break; } - return result; + return res; } /*********************************************************************** @@ -4481,8 +4470,8 @@ CURLcode ftp_regular_transfer(struct connectdata *conn, Curl_pgrsSetUploadCounter(data, 0); Curl_pgrsSetDownloadCounter(data, 0); - Curl_pgrsSetUploadSize(data, -1); - Curl_pgrsSetDownloadSize(data, -1); + Curl_pgrsSetUploadSize(data, 0); + Curl_pgrsSetDownloadSize(data, 0); ftpc->ctl_valid = TRUE; /* starts good */ @@ -4490,7 +4479,7 @@ CURLcode ftp_regular_transfer(struct connectdata *conn, &connected, /* have we connected after PASV/PORT */ dophase_done); /* all commands in the DO-phase done? */ - if(!result) { + if(CURLE_OK == result) { if(!*dophase_done) /* the DO phase has not completed yet */ diff --git a/lib/ftp.h b/lib/ftp.h index 833447b..b6bfc02 100644 --- a/lib/ftp.h +++ b/lib/ftp.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -147,10 +147,11 @@ struct ftp_conn { curl_off_t known_filesize; /* file size is different from -1, if wildcard LIST parsing was done and wc_statemach set it */ - /* newhost is the (allocated) IP addr or host name to connect the data - connection to */ - char *newhost; /* this is the pair to connect the DATA... */ - unsigned short newport; /* connection to */ + /* newhost must be able to hold a full IP-style address in ASCII, which + in the IPv6 case means 5*8-1 = 39 letters */ +#define NEWHOST_BUFSIZE 48 + char newhost[NEWHOST_BUFSIZE]; /* this is the pair to connect the DATA... */ + unsigned short newport; /* connection to */ }; diff --git a/lib/ftplistparser.c b/lib/ftplistparser.c index 9aacad9..4a46dd1 100644 --- a/lib/ftplistparser.c +++ b/lib/ftplistparser.c @@ -23,13 +23,13 @@ /** * Now implemented: * - * 1) Unix version 1 + * 1) UNIX version 1 * drwxr-xr-x 1 user01 ftp 512 Jan 29 23:32 prog - * 2) Unix version 2 + * 2) UNIX version 2 * drwxr-xr-x 1 user01 ftp 512 Jan 29 1997 prog - * 3) Unix version 3 + * 3) UNIX version 3 * drwxr-xr-x 1 1 1 512 Jan 29 23:32 prog - * 4) Unix symlink + * 4) UNIX symlink * lrwxr-xr-x 1 user01 ftp 512 Jan 29 23:32 prog -> prog2000 * 5) DOS style * 01-29-97 11:32PM prog @@ -365,7 +365,7 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, struct ftp_parselist_data *parser = tmpdata->parser; struct curl_fileinfo *finfo; unsigned long i = 0; - CURLcode result; + CURLcode rc; if(parser->error) { /* error in previous call */ /* scenario: @@ -758,9 +758,9 @@ 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); - if(result) { - PL_ERROR(conn, result); + rc = ftp_pl_insert_finfo(conn, finfo); + if(rc) { + PL_ERROR(conn, rc); return bufflen; } } @@ -770,9 +770,9 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, finfo->b_data[parser->item_offset + parser->item_length] = 0; parser->offsets.filename = parser->item_offset; parser->state.UNIX.main = PL_UNIX_FILETYPE; - result = ftp_pl_insert_finfo(conn, finfo); - if(result) { - PL_ERROR(conn, result); + rc = ftp_pl_insert_finfo(conn, finfo); + if(rc) { + PL_ERROR(conn, rc); return bufflen; } } @@ -866,9 +866,9 @@ 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); - if(result) { - PL_ERROR(conn, result); + rc = ftp_pl_insert_finfo(conn, finfo); + if(rc) { + PL_ERROR(conn, rc); return bufflen; } parser->state.UNIX.main = PL_UNIX_FILETYPE; @@ -878,9 +878,9 @@ 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); - if(result) { - PL_ERROR(conn, result); + rc = ftp_pl_insert_finfo(conn, finfo); + if(rc) { + PL_ERROR(conn, rc); return bufflen; } parser->state.UNIX.main = PL_UNIX_FILETYPE; @@ -1011,9 +1011,9 @@ 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); - if(result) { - PL_ERROR(conn, result); + rc = ftp_pl_insert_finfo(conn, finfo); + if(rc) { + PL_ERROR(conn, rc); return bufflen; } parser->state.NT.main = PL_WINNT_DATE; @@ -1023,9 +1023,9 @@ 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); - if(result) { - PL_ERROR(conn, result); + rc = ftp_pl_insert_finfo(conn, finfo); + if(rc) { + PL_ERROR(conn, rc); return bufflen; } parser->state.NT.main = PL_WINNT_DATE; @@ -1041,7 +1041,7 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, } break; default: - return bufflen + 1; + return bufflen+1; } i++; diff --git a/lib/getinfo.c b/lib/getinfo.c index 0ffdd74..bbda35d 100644 --- a/lib/getinfo.c +++ b/lib/getinfo.c @@ -42,7 +42,7 @@ CURLcode Curl_initinfo(struct SessionHandle *data) { struct Progress *pro = &data->progress; - struct PureInfo *info = &data->info; + struct PureInfo *info =&data->info; pro->t_nslookup = 0; pro->t_connect = 0; @@ -116,7 +116,6 @@ static CURLcode getinfo_char(struct SessionHandle *data, CURLINFO info, default: return CURLE_BAD_FUNCTION_ARGUMENT; } - return CURLE_OK; } @@ -203,7 +202,6 @@ static CURLcode getinfo_long(struct SessionHandle *data, CURLINFO info, default: return CURLE_BAD_FUNCTION_ARGUMENT; } - return CURLE_OK; } @@ -256,7 +254,6 @@ static CURLcode getinfo_double(struct SessionHandle *data, CURLINFO info, default: return CURLE_BAD_FUNCTION_ARGUMENT; } - return CURLE_OK; } @@ -264,8 +261,8 @@ static CURLcode getinfo_slist(struct SessionHandle *data, CURLINFO info, struct curl_slist **param_slistp) { union { - struct curl_certinfo *to_certinfo; - struct curl_slist *to_slist; + struct curl_certinfo * to_certinfo; + struct curl_slist * to_slist; } ptr; switch(info) { @@ -288,7 +285,6 @@ static CURLcode getinfo_slist(struct SessionHandle *data, CURLINFO info, struct curl_tlssessioninfo *tsi = &data->tsi; struct connectdata *conn = data->easy_conn; unsigned int sockindex = 0; - void *internals = NULL; *tsip = tsi; tsi->backend = CURLSSLBACKEND_NONE; @@ -307,21 +303,25 @@ static CURLcode getinfo_slist(struct SessionHandle *data, CURLINFO info, /* Return the TLS session information from the relevant backend */ #ifdef USE_SSLEAY - internals = conn->ssl[sockindex].ctx; + tsi->backend = CURLSSLBACKEND_OPENSSL; + tsi->internals = conn->ssl[sockindex].ctx; #endif #ifdef USE_GNUTLS - internals = conn->ssl[sockindex].session; + tsi->backend = CURLSSLBACKEND_GNUTLS; + tsi->internals = conn->ssl[sockindex].session; #endif #ifdef USE_NSS - internals = conn->ssl[sockindex].handle; + tsi->backend = CURLSSLBACKEND_NSS; + tsi->internals = conn->ssl[sockindex].handle; +#endif +#ifdef USE_QSOSSL + tsi->backend = CURLSSLBACKEND_QSOSSL; + tsi->internals = conn->ssl[sockindex].handle; #endif #ifdef USE_GSKIT - internals = conn->ssl[sockindex].handle; + tsi->backend = CURLSSLBACKEND_GSKIT; + tsi->internals = conn->ssl[sockindex].handle; #endif - if(internals) { - tsi->backend = Curl_ssl_backend(); - tsi->internals = internals; - } /* NOTE: For other SSL backends, it is not immediately clear what data to return from 'struct ssl_connect_data'; thus, for now we keep the backend as CURLSSLBACKEND_NONE in those cases, which should be @@ -331,23 +331,22 @@ static CURLcode getinfo_slist(struct SessionHandle *data, CURLINFO info, default: return CURLE_BAD_FUNCTION_ARGUMENT; } - return CURLE_OK; } CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...) { va_list arg; - long *param_longp = NULL; - double *param_doublep = NULL; - char **param_charp = NULL; - struct curl_slist **param_slistp = NULL; + long *param_longp=NULL; + double *param_doublep=NULL; + char **param_charp=NULL; + struct curl_slist **param_slistp=NULL; int type; /* default return code is to error out! */ - CURLcode result = CURLE_BAD_FUNCTION_ARGUMENT; + CURLcode ret = CURLE_BAD_FUNCTION_ARGUMENT; if(!data) - return result; + return ret; va_start(arg, info); @@ -355,29 +354,28 @@ CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...) switch(type) { case CURLINFO_STRING: param_charp = va_arg(arg, char **); - if(param_charp) - result = getinfo_char(data, info, param_charp); + if(NULL != param_charp) + ret = getinfo_char(data, info, param_charp); break; case CURLINFO_LONG: param_longp = va_arg(arg, long *); - if(param_longp) - result = getinfo_long(data, info, param_longp); + if(NULL != param_longp) + ret = getinfo_long(data, info, param_longp); break; case CURLINFO_DOUBLE: param_doublep = va_arg(arg, double *); - if(param_doublep) - result = getinfo_double(data, info, param_doublep); + if(NULL != param_doublep) + ret = getinfo_double(data, info, param_doublep); break; case CURLINFO_SLIST: param_slistp = va_arg(arg, struct curl_slist **); - if(param_slistp) - result = getinfo_slist(data, info, param_slistp); + if(NULL != param_slistp) + ret = getinfo_slist(data, info, param_slistp); break; default: break; } va_end(arg); - - return result; + return ret; } diff --git a/lib/gopher.c b/lib/gopher.c index f3fd065..b1dd65f 100644 --- a/lib/gopher.c +++ b/lib/gopher.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * 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 @@ -121,7 +121,7 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done) for(;;) { result = Curl_write(conn, sockfd, sel, k, &amount); - if(!result) { /* Which may not have written it all! */ + if(CURLE_OK == result) { /* Which may not have written it all! */ result = Curl_client_write(conn, CLIENTWRITE_HEADER, sel, amount); if(result) { Curl_safefree(sel_org); @@ -154,7 +154,7 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done) /* We can use Curl_sendf to send the terminal \r\n relatively safely and save allocing another string/doing another _write loop. */ result = Curl_sendf(sockfd, conn, "\r\n"); - if(result) { + if(result != CURLE_OK) { failf(data, "Failed sending Gopher request"); return result; } diff --git a/lib/hostasyn.c b/lib/hostasyn.c index 3cf8004..8151b67 100644 --- a/lib/hostasyn.c +++ b/lib/hostasyn.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * 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 @@ -75,7 +75,7 @@ CURLcode Curl_addrinfo_callback(struct connectdata *conn, struct Curl_addrinfo *ai) { struct Curl_dns_entry *dns = NULL; - CURLcode result = CURLE_OK; + CURLcode rc = CURLE_OK; conn->async.status = status; @@ -92,14 +92,14 @@ CURLcode Curl_addrinfo_callback(struct connectdata *conn, if(!dns) { /* failed to store, cleanup and return error */ Curl_freeaddrinfo(ai); - result = CURLE_OUT_OF_MEMORY; + rc = CURLE_OUT_OF_MEMORY; } if(data->share) Curl_share_unlock(data, CURL_LOCK_DATA_DNS); } else { - result = CURLE_OUT_OF_MEMORY; + rc = CURLE_OUT_OF_MEMORY; } } @@ -110,9 +110,9 @@ CURLcode Curl_addrinfo_callback(struct connectdata *conn, async struct */ conn->async.done = TRUE; - /* IPv4: The input hostent struct will be freed by ares when we return from + /* ipv4: The input hostent struct will be freed by ares when we return from this function */ - return result; + return rc; } /* Call this function after Curl_connect() has returned async=TRUE and diff --git a/lib/hostcheck.c b/lib/hostcheck.c index 21af8fa..42eb2ee 100644 --- a/lib/hostcheck.c +++ b/lib/hostcheck.c @@ -22,7 +22,8 @@ #include "curl_setup.h" -#if defined(USE_SSLEAY) || defined(USE_AXTLS) || defined(USE_GSKIT) +#if defined(USE_SSLEAY) || defined(USE_AXTLS) || defined(USE_QSOSSL) || \ + defined(USE_GSKIT) /* these backends use functions from this file */ #ifdef HAVE_NETINET_IN_H @@ -144,4 +145,4 @@ int Curl_cert_hostcheck(const char *match_pattern, const char *hostname) return res; } -#endif /* SSLEAY or AXTLS or GSKIT */ +#endif /* SSLEAY or AXTLS or QSOSSL or GSKIT */ diff --git a/lib/hostip.c b/lib/hostip.c index 2ea0ab6..61d238a 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -98,8 +98,8 @@ * hostip.c - method-independent resolver functions and utility functions * hostasyn.c - functions for asynchronous name resolves * hostsyn.c - functions for synchronous name resolves - * hostip4.c - IPv4 specific functions - * hostip6.c - IPv6 specific functions + * hostip4.c - ipv4-specific functions + * hostip6.c - ipv6-specific functions * * The two asynchronous name resolver backends are implemented in: * asyn-ares.c - functions for ares-using name resolves @@ -318,51 +318,6 @@ remove_entry_if_stale(struct SessionHandle *data, struct Curl_dns_entry *dns) sigjmp_buf curl_jmpenv; #endif -/* - * Curl_fetch_addr() fetches a 'Curl_dns_entry' already in the DNS cache. - * - * Curl_resolv() checks initially and multi_runsingle() checks each time - * it discovers the handle in the state WAITRESOLVE whether the hostname - * has already been resolved and the address has already been stored in - * the DNS cache. This short circuits waiting for a lot of pending - * lookups for the same hostname requested by different handles. - * - * Returns the Curl_dns_entry entry pointer or NULL if not in the cache. - */ -struct Curl_dns_entry * -Curl_fetch_addr(struct connectdata *conn, - const char *hostname, - int port) -{ - char *entry_id = NULL; - struct Curl_dns_entry *dns = NULL; - size_t entry_len; - struct SessionHandle *data = conn->data; - int stale; - - /* Create an entry id, based upon the hostname and port */ - entry_id = create_hostcache_id(hostname, port); - /* If we can't create the entry id, fail */ - if(!entry_id) - return dns; - - 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); - - /* free the allocated entry_id again */ - free(entry_id); - - /* See whether the returned entry is stale. Done before we release lock */ - stale = remove_entry_if_stale(data, dns); - if(stale) { - infof(data, "Hostname in DNS cache was stale, zapped\n"); - dns = NULL; /* the memory deallocation is being handled by the hash */ - } - - return dns; -} /* * Curl_cache_addr() stores a 'Curl_addrinfo' struct in the DNS cache. @@ -448,20 +403,41 @@ int Curl_resolv(struct connectdata *conn, int port, struct Curl_dns_entry **entry) { + char *entry_id = NULL; struct Curl_dns_entry *dns = NULL; + size_t entry_len; struct SessionHandle *data = conn->data; CURLcode result; int rc = CURLRESOLV_ERROR; /* default to failure */ *entry = NULL; + /* Create an entry id, based upon the hostname and port */ + entry_id = create_hostcache_id(hostname, port); + /* If we can't create the entry id, fail */ + if(!entry_id) + return rc; + + entry_len = strlen(entry_id); + if(data->share) Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE); - dns = Curl_fetch_addr(conn, hostname, port); + /* See if its already in our dns cache */ + dns = Curl_hash_pick(data->dns.hostcache, entry_id, entry_len+1); + + /* free the allocated entry_id again */ + free(entry_id); + + infof(data, "Hostname was %sfound in DNS cache\n", dns?"":"NOT "); + + /* See whether the returned entry is stale. Done before we release lock */ + if(remove_entry_if_stale(data, dns)) { + infof(data, "Hostname in DNS cache was stale, zapped\n"); + dns = NULL; /* the memory deallocation is being handled by the hash */ + } if(dns) { - infof(data, "Hostname %s was found in DNS cache\n", hostname); dns->inuse++; /* we use it! */ rc = CURLRESOLV_RESOLVED; } diff --git a/lib/hostip.h b/lib/hostip.h index e1e880e..42ed7d3 100644 --- a/lib/hostip.h +++ b/lib/hostip.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -92,7 +92,7 @@ int Curl_resolv_timeout(struct connectdata *conn, const char *hostname, #ifdef CURLRES_IPV6 /* - * Curl_ipv6works() returns TRUE if IPv6 seems to work. + * Curl_ipv6works() returns TRUE if ipv6 seems to work. */ bool Curl_ipv6works(void); #else @@ -172,15 +172,6 @@ const char *Curl_printable_address(const Curl_addrinfo *ip, char *buf, size_t bufsize); /* - * Curl_fetch_addr() fetches a 'Curl_dns_entry' already in the DNS cache. - * - * Returns the Curl_dns_entry entry pointer or NULL if not in the cache. - */ -struct Curl_dns_entry * -Curl_fetch_addr(struct connectdata *conn, - const char *hostname, - int port); -/* * Curl_cache_addr() stores a 'Curl_addrinfo' struct in the DNS cache. * * Returns the Curl_dns_entry entry pointer or NULL if the storage failed. diff --git a/lib/hostip4.c b/lib/hostip4.c index 3a05d10..1e39f4a 100644 --- a/lib/hostip4.c +++ b/lib/hostip4.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , 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,9 +57,9 @@ #include "memdebug.h" /*********************************************************************** - * Only for plain IPv4 builds + * Only for plain-ipv4 builds **********************************************************************/ -#ifdef CURLRES_IPV4 /* plain IPv4 code coming up */ +#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. @@ -67,7 +67,7 @@ bool Curl_ipvalid(struct connectdata *conn) { if(conn->ip_version == CURL_IPRESOLVE_V6) - /* An IPv6 address was requested and we can't get/use one */ + /* an ipv6 address was requested and we can't get/use one */ return FALSE; return TRUE; /* OK, proceed */ @@ -76,7 +76,7 @@ bool Curl_ipvalid(struct connectdata *conn) #ifdef CURLRES_SYNCH /* - * Curl_getaddrinfo() - the IPv4 synchronous version. + * Curl_getaddrinfo() - the ipv4 synchronous version. * * The original code to this function was from the Dancer source code, written * by Bjorn Reese, it has since been patched and modified considerably. diff --git a/lib/hostip6.c b/lib/hostip6.c index bb72391..8327004 100644 --- a/lib/hostip6.c +++ b/lib/hostip6.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , 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 @@ #include "memdebug.h" /*********************************************************************** - * Only for IPv6-enabled builds + * Only for ipv6-enabled builds **********************************************************************/ #ifdef CURLRES_IPV6 @@ -97,7 +97,7 @@ int curl_dogetnameinfo(GETNAMEINFO_QUAL_ARG1 GETNAMEINFO_TYPE_ARG1 sa, #endif /* defined(CURLDEBUG) && defined(HAVE_GETNAMEINFO) */ /* - * Curl_ipv6works() returns TRUE if IPv6 seems to work. + * Curl_ipv6works() returns TRUE if ipv6 seems to work. */ bool Curl_ipv6works(void) { @@ -109,7 +109,7 @@ bool Curl_ipv6works(void) /* probe to see if we have a working IPv6 stack */ curl_socket_t s = socket(PF_INET6, SOCK_DGRAM, 0); if(s == CURL_SOCKET_BAD) - /* an IPv6 address was requested but we can't get/use one */ + /* an ipv6 address was requested but we can't get/use one */ ipv6_works = 0; else { ipv6_works = 1; @@ -152,7 +152,7 @@ static void dump_addrinfo(struct connectdata *conn, const Curl_addrinfo *ai) #endif /* - * Curl_getaddrinfo() when built IPv6-enabled (non-threading and + * Curl_getaddrinfo() when built ipv6-enabled (non-threading and * non-ares version). * * Returns name information about the given hostname and port number. If @@ -192,7 +192,7 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn, } if((pf != PF_INET) && !Curl_ipv6works()) - /* The stack seems to be a non-IPv6 one */ + /* the stack seems to be a non-ipv6 one */ pf = PF_INET; memset(&hints, 0, sizeof(hints)); diff --git a/lib/http.c b/lib/http.c index c34b46d..78791ee 100644 --- a/lib/http.c +++ b/lib/http.c @@ -279,7 +279,7 @@ static CURLcode http_output_basic(struct connectdata *conn, bool proxy) char **userp; const char *user; const char *pwd; - CURLcode result; + CURLcode error; if(proxy) { userp = &conn->allocptr.proxyuserpwd; @@ -294,11 +294,11 @@ static CURLcode http_output_basic(struct connectdata *conn, bool proxy) snprintf(data->state.buffer, sizeof(data->state.buffer), "%s:%s", user, pwd); - result = Curl_base64_encode(data, - data->state.buffer, strlen(data->state.buffer), - &authorization, &size); - if(result) - return result; + error = Curl_base64_encode(data, + data->state.buffer, strlen(data->state.buffer), + &authorization, &size); + if(error) + return error; if(!authorization) return CURLE_REMOTE_ACCESS_DENIED; @@ -328,8 +328,8 @@ static bool pickoneauth(struct auth *pick) /* The order of these checks is highly relevant, as this will be the order of preference in case of the existence of multiple accepted types. */ - if(avail & CURLAUTH_NEGOTIATE) - pick->picked = CURLAUTH_NEGOTIATE; + if(avail & CURLAUTH_GSSNEGOTIATE) + pick->picked = CURLAUTH_GSSNEGOTIATE; else if(avail & CURLAUTH_DIGEST) pick->picked = CURLAUTH_DIGEST; else if(avail & CURLAUTH_NTLM) @@ -347,82 +347,6 @@ static bool pickoneauth(struct auth *pick) return picked; } -/* whether to complete request (for authentication) in current connection */ -static bool complete_request(struct connectdata *conn, - curl_off_t remaining_bytes) -{ -#if defined(USE_NTLM) || defined(USE_SPNEGO) - struct SessionHandle *data = conn->data; - bool have_ntlm_or_negotiate = FALSE; - bool auth_started = FALSE; - - /* don't reset connection when we're in NTLM or Negotiate authentication; - * those authenticate the connection - creating a new connection breaks the - * authentication. - */ - -#if defined(USE_NTLM) - /* proxy NTLM authentication */ - if((data->state.authproxy.picked == CURLAUTH_NTLM) || - (data->state.authproxy.picked == CURLAUTH_NTLM_WB)) { - have_ntlm_or_negotiate = TRUE; - auth_started = auth_started - || (conn->proxyntlm.state != NTLMSTATE_NONE); - } - - /* normal NTLM authentication */ - if((data->state.authhost.picked == CURLAUTH_NTLM) || - (data->state.authhost.picked == CURLAUTH_NTLM_WB)) { - have_ntlm_or_negotiate = TRUE; - auth_started = auth_started - || (conn->ntlm.state != NTLMSTATE_NONE); - } -#endif - -#if defined(USE_SPNEGO) - /* proxy Negotiate authentication */ - if(data->state.authproxy.picked == CURLAUTH_NEGOTIATE) { - have_ntlm_or_negotiate = TRUE; - auth_started = auth_started - || (data->state.proxyneg.state != GSS_AUTHNONE); - } - - /* normal Negotiate authentication */ - if(data->state.authhost.picked == CURLAUTH_NEGOTIATE) { - have_ntlm_or_negotiate = TRUE; - auth_started = auth_started - || (data->state.negotiate.state != GSS_AUTHNONE); - } -#endif - - if(have_ntlm_or_negotiate) { - if(remaining_bytes < 2000 || auth_started) { - /* NTLM/Negotiation has started *OR* there is just a little (<2K) - * data left to send, keep on sending. - */ - - /* rewind data when completely done sending! */ - if(!conn->bits.authneg) { - conn->bits.rewindaftersend = TRUE; - infof(data, "Rewind stream after send\n"); - } - - return TRUE; - } - - infof(data, "NTLM/Negotiate send, close instead of sending %" - CURL_FORMAT_CURL_OFF_T " bytes\n", - remaining_bytes); - } -#else - /* unused parameters: */ - (void)conn; - (void)remaining_bytes; -#endif - - return FALSE; -} - /* * Curl_http_perhapsrewind() * @@ -468,15 +392,10 @@ static CURLcode http_perhapsrewind(struct connectdata *conn) bytessent = http->writebytecount; - if(conn->bits.authneg) { + if(conn->bits.authneg) /* This is a state where we are known to be negotiating and we don't send any data then. */ expectsend = 0; - } - else if(!conn->bits.protoconnstart) { - /* HTTP CONNECT in progress: there is no body */ - expectsend = 0; - } else { /* figure out how much data we are expected to send */ switch(data->set.httpreq) { @@ -501,14 +420,36 @@ static CURLcode http_perhapsrewind(struct connectdata *conn) conn->bits.rewindaftersend = FALSE; /* default */ if((expectsend == -1) || (expectsend > bytessent)) { - if(conn->bits.close) - /* this is already marked to get closed */ - return CURLE_OK; + /* There is still data left to send */ + if((data->state.authproxy.picked == CURLAUTH_NTLM) || + (data->state.authhost.picked == CURLAUTH_NTLM) || + (data->state.authproxy.picked == CURLAUTH_NTLM_WB) || + (data->state.authhost.picked == CURLAUTH_NTLM_WB)) { + if(((expectsend - bytessent) < 2000) || + (conn->ntlm.state != NTLMSTATE_NONE) || + (conn->proxyntlm.state != NTLMSTATE_NONE)) { + /* The NTLM-negotiation has started *OR* there is just a little (<2K) + data left to send, keep on sending. */ + + /* rewind data when completely done sending! */ + if(!conn->bits.authneg) { + conn->bits.rewindaftersend = TRUE; + infof(data, "Rewind stream after send\n"); + } - if(complete_request(conn, (curl_off_t)(expectsend - bytessent))) - return CURLE_OK; + return CURLE_OK; + } + if(conn->bits.close) + /* this is already marked to get closed */ + return CURLE_OK; - /* This is not NTLM or many bytes left to send: close */ + infof(data, "NTLM send, close instead of sending %" + CURL_FORMAT_CURL_OFF_T " bytes\n", + (curl_off_t)(expectsend - bytessent)); + } + + /* This is not NTLM or many bytes left to send: close + */ connclose(conn, "Mid-auth HTTP and much data left to send"); data->req.size = 0; /* don't download any more than 0 bytes */ @@ -517,7 +458,7 @@ static CURLcode http_perhapsrewind(struct connectdata *conn) } if(bytessent) - /* we rewind now at once since we already sent something */ + /* we rewind now at once since if we already sent something */ return Curl_readrewind(conn); return CURLE_OK; @@ -535,7 +476,7 @@ CURLcode Curl_http_auth_act(struct connectdata *conn) struct SessionHandle *data = conn->data; bool pickhost = FALSE; bool pickproxy = FALSE; - CURLcode result = CURLE_OK; + CURLcode code = CURLE_OK; if(100 <= data->req.httpcode && 199 >= data->req.httpcode) /* this is a transient response code, ignore */ @@ -571,9 +512,9 @@ CURLcode Curl_http_auth_act(struct connectdata *conn) if((data->set.httpreq != HTTPREQ_GET) && (data->set.httpreq != HTTPREQ_HEAD) && !conn->bits.rewindaftersend) { - result = http_perhapsrewind(conn); - if(result) - return result; + code = http_perhapsrewind(conn); + if(code) + return code; } } @@ -595,10 +536,10 @@ CURLcode Curl_http_auth_act(struct connectdata *conn) if(http_should_fail(conn)) { failf (data, "The requested URL returned error: %d", data->req.httpcode); - result = CURLE_HTTP_RETURNED_ERROR; + code = CURLE_HTTP_RETURNED_ERROR; } - return result; + return code; } @@ -613,12 +554,10 @@ output_auth_headers(struct connectdata *conn, const char *path, bool proxy) { - const char *auth = NULL; - CURLcode result = CURLE_OK; -#if defined(USE_SPNEGO) || !defined(CURL_DISABLE_VERBOSE_STRINGS) struct SessionHandle *data = conn->data; -#endif -#ifdef USE_SPNEGO + const char *auth=NULL; + CURLcode result = CURLE_OK; +#ifdef USE_HTTP_NEGOTIATE struct negotiatedata *negdata = proxy? &data->state.proxyneg:&data->state.negotiate; #endif @@ -628,11 +567,11 @@ output_auth_headers(struct connectdata *conn, (void)path; #endif -#ifdef USE_SPNEGO +#ifdef USE_HTTP_NEGOTIATE negdata->state = GSS_AUTHNONE; - if((authstatus->picked == CURLAUTH_NEGOTIATE) && + if((authstatus->picked == CURLAUTH_GSSNEGOTIATE) && negdata->context && !GSS_ERROR(negdata->status)) { - auth="Negotiate"; + auth="GSS-Negotiate"; result = Curl_output_negotiate(conn, proxy); if(result) return result; @@ -798,10 +737,6 @@ CURLcode Curl_http_input_auth(struct connectdata *conn, bool proxy, */ struct SessionHandle *data = conn->data; -#ifdef USE_SPNEGO - struct negotiatedata *negdata = proxy? - &data->state.proxyneg:&data->state.negotiate; -#endif unsigned long *availp; struct auth *authp; @@ -832,14 +767,21 @@ CURLcode Curl_http_input_auth(struct connectdata *conn, bool proxy, */ while(*auth) { -#ifdef USE_SPNEGO - if(checkprefix("Negotiate", auth)) { +#ifdef USE_HTTP_NEGOTIATE + if(checkprefix("GSS-Negotiate", auth) || + checkprefix("Negotiate", auth)) { int neg; - *availp |= CURLAUTH_NEGOTIATE; - authp->avail |= CURLAUTH_NEGOTIATE; - - if(authp->picked == CURLAUTH_NEGOTIATE) { - if(negdata->state == GSS_AUTHSENT || negdata->state == GSS_AUTHNONE) { + *availp |= CURLAUTH_GSSNEGOTIATE; + authp->avail |= CURLAUTH_GSSNEGOTIATE; + + if(authp->picked == CURLAUTH_GSSNEGOTIATE) { + if(data->state.negotiate.state == GSS_AUTHSENT) { + /* if we sent GSS authentication in the outgoing request and we get + this back, we're in trouble */ + infof(data, "Authentication problem. Ignoring this.\n"); + data->state.authproblem = TRUE; + } + else if(data->state.negotiate.state == GSS_AUTHNONE) { neg = Curl_input_negotiate(conn, proxy, auth); if(neg == 0) { DEBUGASSERT(!data->req.newurl); @@ -847,8 +789,8 @@ CURLcode Curl_http_input_auth(struct connectdata *conn, bool proxy, if(!data->req.newurl) return CURLE_OUT_OF_MEMORY; data->state.authproblem = FALSE; - /* we received a GSS auth token and we dealt with it fine */ - negdata->state = GSS_AUTHRECV; + /* we received GSS auth info and we dealt with it fine */ + data->state.negotiate.state = GSS_AUTHRECV; } else data->state.authproblem = TRUE; @@ -865,8 +807,9 @@ CURLcode Curl_http_input_auth(struct connectdata *conn, bool proxy, if(authp->picked == CURLAUTH_NTLM || authp->picked == CURLAUTH_NTLM_WB) { /* NTLM authentication is picked and activated */ - CURLcode result = Curl_input_ntlm(conn, proxy, auth); - if(!result) { + CURLcode ntlm = + Curl_input_ntlm(conn, proxy, auth); + if(CURLE_OK == ntlm) { data->state.authproblem = FALSE; #ifdef NTLM_WB_ENABLED if(authp->picked == CURLAUTH_NTLM_WB) { @@ -904,7 +847,7 @@ CURLcode Curl_http_input_auth(struct connectdata *conn, bool proxy, infof(data, "Ignoring duplicate digest auth header.\n"); } else { - CURLcode result; + CURLdigest dig; *availp |= CURLAUTH_DIGEST; authp->avail |= CURLAUTH_DIGEST; @@ -912,8 +855,9 @@ CURLcode Curl_http_input_auth(struct connectdata *conn, bool proxy, * authentication isn't activated yet, as we need to store the * incoming data from this header in case we are gonna use * Digest. */ - result = Curl_input_digest(conn, proxy, auth); - if(result) { + dig = Curl_input_digest(conn, proxy, auth); + + if(CURLDIGEST_FINE != dig) { infof(data, "Authentication problem. Ignoring this.\n"); data->state.authproblem = TRUE; } @@ -979,6 +923,14 @@ static int http_should_fail(struct connectdata *conn) if(httpcode < 400) return 0; + if(data->state.resume_from && + (data->set.httpreq==HTTPREQ_GET) && + (httpcode == 416)) { + /* "Requested Range Not Satisfiable", just proceed and + pretend this is no error */ + return 0; + } + /* ** Any code >= 400 that's not 401 or 407 is always ** a terminal error @@ -1100,7 +1052,7 @@ CURLcode Curl_add_buffer_send(Curl_send_buffer *in, { ssize_t amount; - CURLcode result; + CURLcode res; char *ptr; size_t size; struct HTTP *http = conn->data->req.protop; @@ -1123,14 +1075,14 @@ CURLcode Curl_add_buffer_send(Curl_send_buffer *in, DEBUGASSERT(size > included_body_bytes); - result = Curl_convert_to_network(conn->data, ptr, headersize); + res = Curl_convert_to_network(conn->data, ptr, headersize); /* Curl_convert_to_network calls failf if unsuccessful */ - if(result) { + if(res) { /* conversion failed, free memory and return to the caller */ if(in->buffer) free(in->buffer); free(in); - return result; + return res; } @@ -1155,9 +1107,9 @@ CURLcode Curl_add_buffer_send(Curl_send_buffer *in, else sendsize = size; - result = Curl_write(conn, sockfd, ptr, sendsize, &amount); + res = Curl_write(conn, sockfd, ptr, sendsize, &amount); - if(!result) { + if(CURLE_OK == res) { /* * Note that we may not send the entire chunk at once, and we have a set * number of data bytes at the end of the big buffer (out of which we may @@ -1235,7 +1187,7 @@ CURLcode Curl_add_buffer_send(Curl_send_buffer *in, free(in->buffer); free(in); - return result; + return res; } @@ -1491,18 +1443,6 @@ CURLcode Curl_http_done(struct connectdata *conn, Curl_unencode_cleanup(conn); -#ifdef USE_SPNEGO - if(data->state.proxyneg.state == GSS_AUTHSENT || - data->state.negotiate.state == GSS_AUTHSENT) { - /* add forbid re-use if http-code != 401 as a WA - * only needed for 401 that failed handling - * otherwie state will be RECV with current code */ - if((data->req.httpcode != 401) && (data->req.httpcode != 407)) - connclose(conn, "Negotiate transfer completed"); - Curl_cleanup_negotiate(data); - } -#endif - /* set the proper values (possibly modified on POST) */ conn->fread_func = data->set.fread_func; /* restore */ conn->fread_in = data->set.in; /* restore */ @@ -1533,8 +1473,8 @@ CURLcode Curl_http_done(struct connectdata *conn, else if(HTTPREQ_PUT == data->set.httpreq) data->req.bytecount = http->readbytecount + http->writebytecount; - if(status) - return status; + if(status != CURLE_OK) + return (status); if(!premature && /* this check is pointless when DONE is called before the entire operation is complete */ @@ -1582,6 +1522,10 @@ static CURLcode expect100(struct SessionHandle *data, const char *ptr; data->state.expect100header = FALSE; /* default to false unless it is set to TRUE below */ + if(conn->httpversion == 20) { + /* We don't use Expect in HTTP2 */ + return CURLE_OK; + } if(use_http_1_1plus(data, conn)) { /* if not doing HTTP 1.0 or disabled explicitly, we add a Expect: 100-continue to the headers which actually speeds up post operations @@ -1594,7 +1538,7 @@ static CURLcode expect100(struct SessionHandle *data, else { result = Curl_add_bufferf(req_buffer, "Expect: 100-continue\r\n"); - if(!result) + if(result == CURLE_OK) data->state.expect100header = TRUE; } } @@ -1724,8 +1668,10 @@ CURLcode Curl_add_timecondition(struct SessionHandle *data, { const struct tm *tm; char *buf = data->state.buffer; + CURLcode result = CURLE_OK; struct tm keeptime; - CURLcode result = Curl_gmtime(data->set.timevalue, &keeptime); + + result = Curl_gmtime(data->set.timevalue, &keeptime); if(result) { failf(data, "Invalid TIMEVALUE"); return result; @@ -1776,8 +1722,8 @@ CURLcode Curl_add_timecondition(struct SessionHandle *data, */ CURLcode Curl_http(struct connectdata *conn, bool *done) { - struct SessionHandle *data = conn->data; - CURLcode result = CURLE_OK; + struct SessionHandle *data=conn->data; + CURLcode result=CURLE_OK; struct HTTP *http; const char *ppath = data->state.path; bool paste_ftp_userpwd = FALSE; @@ -1787,9 +1733,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) const char *ptr; const char *request; Curl_HttpReq httpreq = data->set.httpreq; -#if !defined(CURL_DISABLE_COOKIES) char *addcookies = NULL; -#endif curl_off_t included_body = 0; const char *httpstring; Curl_send_buffer *req_buffer; @@ -1803,7 +1747,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) if(conn->httpversion < 20) { /* unless the connection is re-used and already http2 */ - switch(conn->negnpn) { + switch (conn->negnpn) { case NPN_HTTP2: result = Curl_http2_init(conn); if(result) @@ -1813,9 +1757,8 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) if(result) return result; - result = Curl_http2_switched(conn, NULL, 0); - if(result) - return result; + /* TODO: add error checking here */ + Curl_http2_switched(conn); break; case NPN_HTTP1_1: /* continue with HTTP/1.1 when explicitly requested */ @@ -1827,9 +1770,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) } else { /* prepare for a http2 request */ - result = Curl_http2_setup(conn); - if(result) - return result; + Curl_http2_setup(conn); } http = data->req.protop; @@ -1911,10 +1852,8 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) else conn->allocptr.ref = NULL; -#if !defined(CURL_DISABLE_COOKIES) if(data->set.str[STRING_COOKIE] && !Curl_checkheaders(conn, "Cookie:")) addcookies = data->set.str[STRING_COOKIE]; -#endif if(!Curl_checkheaders(conn, "Accept-Encoding:") && data->set.str[STRING_ENCODING]) { @@ -2333,26 +2272,18 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) te ); - /* clear userpwd to avoid re-using 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. + * Free userpwd now --- cannot reuse this for Negotiate and possibly NTLM + * with basic and digest, it will be freed anyway by the next request */ - 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.userpwd); + conn->allocptr.userpwd = NULL; if(result) return result; if(!(conn->handler->flags&PROTOPT_SSL) && - conn->httpversion != 20 && (data->set.httpversion == CURL_HTTP_VERSION_2_0)) { /* append HTTP2 upgrade magic stuff to the HTTP request if it isn't done over SSL */ @@ -2397,16 +2328,17 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) } Curl_cookie_freelist(store, FALSE); /* free the cookie list */ } - if(addcookies && !result) { + if(addcookies && (CURLE_OK == result)) { if(!count) result = Curl_add_bufferf(req_buffer, "Cookie: "); - if(!result) { - result = Curl_add_bufferf(req_buffer, "%s%s", count?"; ":"", + if(CURLE_OK == result) { + result = Curl_add_bufferf(req_buffer, "%s%s", + count?"; ":"", addcookies); count++; } } - if(count && !result) + if(count && (CURLE_OK == result)) result = Curl_add_buffer(req_buffer, "\r\n", 2); if(result) @@ -2425,7 +2357,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) return result; http->postdata = NULL; /* nothing to post at this point */ - Curl_pgrsSetUploadSize(data, -1); /* upload size is unknown atm */ + Curl_pgrsSetUploadSize(data, 0); /* upload size is 0 atm */ /* If 'authdone' is FALSE, we must not set the write socket index to the Curl_transfer() call below, as we're not ready to actually upload any @@ -2658,16 +2590,17 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) if(postsize) { /* Append the POST data chunky-style */ result = Curl_add_bufferf(req_buffer, "%x\r\n", (int)postsize); - if(!result) { + if(CURLE_OK == result) { result = Curl_add_buffer(req_buffer, data->set.postfields, (size_t)postsize); - if(!result) - result = Curl_add_buffer(req_buffer, "\r\n", 2); + if(CURLE_OK == result) + result = Curl_add_buffer(req_buffer, "\r\n", 2); included_body = postsize + 2; } } - if(!result) - result = Curl_add_buffer(req_buffer, "\x30\x0d\x0a\x0d\x0a", 5); + if(CURLE_OK == result) + result = Curl_add_buffer(req_buffer, + "\x30\x0d\x0a\x0d\x0a", 5); /* 0 CR LF CR LF */ included_body += 5; } @@ -3070,12 +3003,9 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data, infof(data, "Received 101\n"); k->upgr101 = UPGR101_RECEIVED; - /* switch to http2 now. The bytes after response headers - are also processed here, otherwise they are lost. */ - result = Curl_http2_switched(conn, k->str, *nread); - if(result) - return result; - *nread = 0; + /* switch to http2 now */ + /* TODO: add error checking */ + Curl_http2_switched(conn); } break; default: @@ -3278,26 +3208,13 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data, #endif /* CURL_DOES_CONVERSIONS */ if(conn->handler->protocol & PROTO_FAMILY_HTTP) { - /* - * https://tools.ietf.org/html/rfc7230#section-3.1.2 - * - * The reponse 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. - */ nc = sscanf(HEADER1, - " HTTP/%d.%d %d", + " HTTP/%d.%d %3d", &httpversion_major, &conn->httpversion, &k->httpcode); if(nc==3) { conn->httpversion += 10 * httpversion_major; - - if(k->upgr101 == UPGR101_RECEIVED) { - /* supposedly upgraded to http2 now */ - if(conn->httpversion != 20) - infof(data, "Lying server, not serving HTTP/2\n"); - } } else { /* this is the real world, not a Nirvana @@ -3375,16 +3292,6 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data, infof(data, "HTTP 1.0, assume close after body\n"); connclose(conn, "HTTP/1.0 close after body"); } - else if(conn->httpversion == 20 || - (k->upgr101 == UPGR101_REQUESTED && k->httpcode == 101)) { - /* Don't enable pipelining for HTTP/2 or upgraded connection. For - HTTP/2, we do not support multiplexing. In general, requests - cannot be pipelined in upgraded connection, since it is now - different protocol. */ - DEBUGF(infof(data, - "HTTP 2 or upgraded connection do not support " - "pipelining for now\n")); - } else if(conn->httpversion >= 11 && !conn->bits.close) { struct connectbundle *cb_ptr; @@ -3629,30 +3536,23 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data, /* Content-Range: bytes [num]- Content-Range: bytes: [num]- Content-Range: [num]- - Content-Range: [asterisk]/[total] The second format was added since Sun's webserver JavaWebServer/1.1.1 obviously sends the header this way! The third added since some servers use that! - The forth means the requested range was unsatisfied. */ char *ptr = k->p + 14; - /* Move forward until first digit or asterisk */ - while(*ptr && !ISDIGIT(*ptr) && *ptr != '*') + /* Move forward until first digit */ + while(*ptr && !ISDIGIT(*ptr)) ptr++; - /* if it truly stopped on a digit */ - if(ISDIGIT(*ptr)) { - k->offset = curlx_strtoofft(ptr, NULL, 10); + 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; - } - else - data->state.resume_from = 0; /* get everything */ + if(data->state.resume_from == k->offset) + /* we asked for a resume and we got it */ + k->content_range = TRUE; } #if !defined(CURL_DISABLE_COOKIES) else if(data->cookies && diff --git a/lib/http.h b/lib/http.h index 907755a..7cf1831 100644 --- a/lib/http.h +++ b/lib/http.h @@ -169,9 +169,7 @@ struct http_conn { sending send_underlying; /* underlying send Curl_send callback */ recving recv_underlying; /* underlying recv Curl_recv callback */ bool closed; /* TRUE on HTTP2 stream close */ - Curl_send_buffer *header_recvbuf; /* store response headers. We - store non-final and final - response headers into it. */ + Curl_send_buffer *header_recvbuf; /* store response headers */ size_t nread_header_recvbuf; /* number of bytes in header_recvbuf fed into upper layer */ int32_t stream_id; /* stream we are interested in */ @@ -187,7 +185,6 @@ struct http_conn { const uint8_t *upload_mem; /* points to a buffer to read from */ size_t upload_len; /* size of the buffer 'upload_mem' points to */ size_t upload_left; /* number of bytes left to upload */ - int status_code; /* HTTP status code */ #else int unused; /* prevent a compiler warning */ #endif diff --git a/lib/http2.c b/lib/http2.c index dac9ab4..c850fdb 100644 --- a/lib/http2.c +++ b/lib/http2.c @@ -39,7 +39,7 @@ /* include memdebug.h last */ #include "memdebug.h" -#if (NGHTTP2_VERSION_NUM < 0x000600) +#if (NGHTTP2_VERSION_NUM < 0x000300) #error too old nghttp2 version, upgrade! #endif @@ -162,15 +162,15 @@ static ssize_t send_callback(nghttp2_session *h2, struct connectdata *conn = (struct connectdata *)userp; struct http_conn *httpc = &conn->proto.httpc; ssize_t written; - CURLcode result = CURLE_OK; - + CURLcode rc; (void)h2; (void)flags; + rc = 0; written = ((Curl_send*)httpc->send_underlying)(conn, FIRSTSOCKET, - data, length, &result); + data, length, &rc); - if(result == CURLE_AGAIN) { + if(rc == CURLE_AGAIN) { return NGHTTP2_ERR_WOULDBLOCK; } @@ -191,80 +191,27 @@ static int on_frame_recv(nghttp2_session *session, const nghttp2_frame *frame, struct connectdata *conn = (struct connectdata *)userp; struct http_conn *c = &conn->proto.httpc; int rv; - size_t left, ncopy; - (void)session; (void)frame; infof(conn->data, "on_frame_recv() was called with header %x\n", frame->hd.type); switch(frame->hd.type) { - case NGHTTP2_DATA: - /* If body started, then receiving DATA is illegal. */ - if(!c->bodystarted) { - rv = nghttp2_submit_rst_stream(session, NGHTTP2_FLAG_NONE, - frame->hd.stream_id, - NGHTTP2_PROTOCOL_ERROR); - - if(nghttp2_is_fatal(rv)) { - return NGHTTP2_ERR_CALLBACK_FAILURE; - } - } - break; case NGHTTP2_HEADERS: - if(frame->headers.cat == NGHTTP2_HCAT_REQUEST) - break; - - if(c->bodystarted) { - /* Only valid HEADERS after body started is trailer header, - which is not fully supported in this code. If HEADERS is not - trailer, then it is a PROTOCOL_ERROR. */ - if((frame->hd.flags & NGHTTP2_FLAG_END_STREAM) == 0) { - rv = nghttp2_submit_rst_stream(session, NGHTTP2_FLAG_NONE, - frame->hd.stream_id, - NGHTTP2_PROTOCOL_ERROR); - - if(nghttp2_is_fatal(rv)) { - return NGHTTP2_ERR_CALLBACK_FAILURE; - } - } - break; - } - - if(c->status_code == -1) { - /* No :status header field means PROTOCOL_ERROR. */ - rv = nghttp2_submit_rst_stream(session, NGHTTP2_FLAG_NONE, - frame->hd.stream_id, - NGHTTP2_PROTOCOL_ERROR); - - if(nghttp2_is_fatal(rv)) { - return NGHTTP2_ERR_CALLBACK_FAILURE; - } - + if(frame->headers.cat != NGHTTP2_HCAT_RESPONSE) break; - } - - /* Only final status code signals the end of header */ - if(c->status_code / 100 != 1) { - c->bodystarted = TRUE; - } - - c->status_code = -1; - + c->bodystarted = TRUE; Curl_add_buffer(c->header_recvbuf, "\r\n", 2); + c->nread_header_recvbuf = c->len < c->header_recvbuf->size_used ? + c->len : c->header_recvbuf->size_used; - left = c->header_recvbuf->size_used - c->nread_header_recvbuf; - ncopy = c->len < left ? c->len : left; - - memcpy(c->mem, c->header_recvbuf->buffer + c->nread_header_recvbuf, ncopy); - c->nread_header_recvbuf += ncopy; + memcpy(c->mem, c->header_recvbuf->buffer, c->nread_header_recvbuf); - c->mem += ncopy; - c->len -= ncopy; + c->mem += c->nread_header_recvbuf; + c->len -= c->nread_header_recvbuf; break; case NGHTTP2_PUSH_PROMISE: rv = nghttp2_submit_rst_stream(session, NGHTTP2_FLAG_NONE, - frame->push_promise.promised_stream_id, - NGHTTP2_CANCEL); + frame->hd.stream_id, NGHTTP2_CANCEL); if(nghttp2_is_fatal(rv)) { return rv; } @@ -275,7 +222,7 @@ static int on_frame_recv(nghttp2_session *session, const nghttp2_frame *frame, static int on_invalid_frame_recv(nghttp2_session *session, const nghttp2_frame *frame, - uint32_t error_code, void *userp) + nghttp2_error_code error_code, void *userp) { struct connectdata *conn = (struct connectdata *)userp; (void)session; @@ -350,7 +297,7 @@ static int on_frame_not_send(nghttp2_session *session, return 0; } static int on_stream_close(nghttp2_session *session, int32_t stream_id, - uint32_t error_code, void *userp) + nghttp2_error_code error_code, void *userp) { struct connectdata *conn = (struct connectdata *)userp; struct http_conn *c = &conn->proto.httpc; @@ -368,6 +315,20 @@ static int on_stream_close(nghttp2_session *session, int32_t stream_id, return 0; } +static int on_unknown_frame_recv(nghttp2_session *session, + const uint8_t *head, size_t headlen, + const uint8_t *payload, size_t payloadlen, + void *userp) +{ + struct connectdata *conn = (struct connectdata *)userp; + (void)session; + (void)head; + (void)headlen; + (void)payload; + (void)payloadlen; + infof(conn->data, "on_unknown_frame_recv() was called\n"); + return 0; +} static int on_begin_headers(nghttp2_session *session, const nghttp2_frame *frame, void *userp) { @@ -378,33 +339,6 @@ static int on_begin_headers(nghttp2_session *session, return 0; } -/* Decode HTTP status code. Returns -1 if no valid status code was - decoded. */ -static int decode_status_code(const uint8_t *value, size_t len) -{ - int i; - int res; - - if(len != 3) { - return -1; - } - - res = 0; - - for(i = 0; i < 3; ++i) { - char c = value[i]; - - if(c < '0' || c > '9') { - return -1; - } - - res *= 10; - res += c - '0'; - } - - return res; -} - static const char STATUS[] = ":status"; /* frame->hd.type is either NGHTTP2_HEADERS or NGHTTP2_PUSH_PROMISE */ @@ -416,10 +350,6 @@ static int on_header(nghttp2_session *session, const nghttp2_frame *frame, { struct connectdata *conn = (struct connectdata *)userp; struct http_conn *c = &conn->proto.httpc; - int rv; - int goodname; - int goodheader; - (void)session; (void)frame; (void)flags; @@ -428,83 +358,45 @@ static int on_header(nghttp2_session *session, const nghttp2_frame *frame, return 0; } - if(c->bodystarted) { - /* Ignore trailer or HEADERS not mapped to HTTP semantics. The - consequence is handled in on_frame_recv(). */ - return 0; - } - - goodname = nghttp2_check_header_name(name, namelen); - goodheader = nghttp2_check_header_value(value, valuelen); - - if(!goodname || !goodheader) { - - infof(conn->data, "Detected bad incoming header %s%s, reset stream!\n", - goodname?"":"name", - goodheader?"":"value"); - - rv = nghttp2_submit_rst_stream(session, NGHTTP2_FLAG_NONE, - frame->hd.stream_id, - NGHTTP2_PROTOCOL_ERROR); - - if(nghttp2_is_fatal(rv)) { - return NGHTTP2_ERR_CALLBACK_FAILURE; - } - - return NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE; - } - if(namelen == sizeof(":status") - 1 && memcmp(STATUS, name, namelen) == 0) { - - /* :status must appear exactly once. */ - if(c->status_code != -1 || - (c->status_code = decode_status_code(value, valuelen)) == -1) { - - rv = nghttp2_submit_rst_stream(session, NGHTTP2_FLAG_NONE, - frame->hd.stream_id, - NGHTTP2_PROTOCOL_ERROR); - if(nghttp2_is_fatal(rv)) { - return NGHTTP2_ERR_CALLBACK_FAILURE; - } - - return NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE; - } - - Curl_add_buffer(c->header_recvbuf, "HTTP/2.0 ", 9); - Curl_add_buffer(c->header_recvbuf, value, valuelen); - Curl_add_buffer(c->header_recvbuf, "\r\n", 2); - + snprintf(c->header_recvbuf->buffer, 13, "HTTP/2.0 %s", value); + c->header_recvbuf->buffer[12] = '\r'; return 0; } else { - /* Here we are sure that namelen > 0 because of - nghttp2_check_header_name(). Pseudo header other than :status - is illegal. */ - if(c->status_code == -1 || name[0] == ':') { - rv = nghttp2_submit_rst_stream(session, NGHTTP2_FLAG_NONE, - frame->hd.stream_id, - NGHTTP2_PROTOCOL_ERROR); - if(nghttp2_is_fatal(rv)) { - return NGHTTP2_ERR_CALLBACK_FAILURE; - } - - return NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE; - } - /* convert to a HTTP1-style header */ + infof(conn->data, "got header\n"); Curl_add_buffer(c->header_recvbuf, name, namelen); Curl_add_buffer(c->header_recvbuf, ":", 1); Curl_add_buffer(c->header_recvbuf, value, valuelen); Curl_add_buffer(c->header_recvbuf, "\r\n", 2); - - infof(conn->data, "got http2 header: %.*s: %.*s\n", - namelen, name, valuelen, value); } return 0; /* 0 is successful */ } +/* + * This is all callbacks nghttp2 calls + */ +static const nghttp2_session_callbacks callbacks = { + send_callback, /* nghttp2_send_callback */ + NULL, /* nghttp2_recv_callback */ + on_frame_recv, /* nghttp2_on_frame_recv_callback */ + on_invalid_frame_recv, /* nghttp2_on_invalid_frame_recv_callback */ + on_data_chunk_recv, /* nghttp2_on_data_chunk_recv_callback */ + before_frame_send, /* nghttp2_before_frame_send_callback */ + on_frame_send, /* nghttp2_on_frame_send_callback */ + on_frame_not_send, /* nghttp2_on_frame_not_send_callback */ + on_stream_close, /* nghttp2_on_stream_close_callback */ + on_unknown_frame_recv, /* nghttp2_on_unknown_frame_recv_callback */ + on_begin_headers, /* nghttp2_on_begin_headers_callback */ + on_header /* nghttp2_on_header_callback */ +#if NGHTTP2_VERSION_NUM >= 0x000400 + , NULL /* nghttp2_select_padding_callback */ +#endif +}; + static ssize_t data_source_read_callback(nghttp2_session *session, int32_t stream_id, uint8_t *buf, size_t length, @@ -552,54 +444,13 @@ CURLcode Curl_http2_init(struct connectdata *conn) { if(!conn->proto.httpc.h2) { int rc; - nghttp2_session_callbacks *callbacks; - conn->proto.httpc.inbuf = malloc(H2_BUFSIZE); if(conn->proto.httpc.inbuf == NULL) return CURLE_OUT_OF_MEMORY; - rc = nghttp2_session_callbacks_new(&callbacks); - - if(rc) { - failf(conn->data, "Couldn't initialize nghttp2 callbacks!"); - return CURLE_OUT_OF_MEMORY; /* most likely at least */ - } - - /* nghttp2_send_callback */ - nghttp2_session_callbacks_set_send_callback(callbacks, send_callback); - /* nghttp2_on_frame_recv_callback */ - nghttp2_session_callbacks_set_on_frame_recv_callback - (callbacks, on_frame_recv); - /* nghttp2_on_invalid_frame_recv_callback */ - nghttp2_session_callbacks_set_on_invalid_frame_recv_callback - (callbacks, on_invalid_frame_recv); - /* nghttp2_on_data_chunk_recv_callback */ - nghttp2_session_callbacks_set_on_data_chunk_recv_callback - (callbacks, on_data_chunk_recv); - /* nghttp2_before_frame_send_callback */ - nghttp2_session_callbacks_set_before_frame_send_callback - (callbacks, before_frame_send); - /* nghttp2_on_frame_send_callback */ - nghttp2_session_callbacks_set_on_frame_send_callback - (callbacks, on_frame_send); - /* nghttp2_on_frame_not_send_callback */ - nghttp2_session_callbacks_set_on_frame_not_send_callback - (callbacks, on_frame_not_send); - /* nghttp2_on_stream_close_callback */ - nghttp2_session_callbacks_set_on_stream_close_callback - (callbacks, on_stream_close); - /* nghttp2_on_begin_headers_callback */ - nghttp2_session_callbacks_set_on_begin_headers_callback - (callbacks, on_begin_headers); - /* nghttp2_on_header_callback */ - nghttp2_session_callbacks_set_on_header_callback(callbacks, on_header); - /* The nghttp2 session is not yet setup, do it */ rc = nghttp2_session_client_new(&conn->proto.httpc.h2, - callbacks, conn); - - nghttp2_session_callbacks_del(callbacks); - + &callbacks, conn); if(rc) { failf(conn->data, "Couldn't initialize nghttp2!"); return CURLE_OUT_OF_MEMORY; /* most likely at least */ @@ -653,8 +504,8 @@ CURLcode Curl_http2_request_upgrade(Curl_send_buffer *req, } conn->proto.httpc.binlen = binlen; - result = Curl_base64url_encode(conn->data, (const char *)binsettings, binlen, - &base64, &blen); + result = Curl_base64_encode(conn->data, (const char *)binsettings, binlen, + &base64, &blen); if(result) return result; @@ -677,7 +528,7 @@ CURLcode Curl_http2_request_upgrade(Curl_send_buffer *req, static ssize_t http2_recv(struct connectdata *conn, int sockindex, char *mem, size_t len, CURLcode *err) { - CURLcode result = CURLE_OK; + CURLcode rc; ssize_t rv; ssize_t nread; struct http_conn *httpc = &conn->proto.httpc; @@ -685,9 +536,6 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex, (void)sockindex; /* we always do HTTP2 on sockindex 0 */ if(httpc->closed) { - /* Reset to FALSE to prevent infinite loop in readwrite_data - function. */ - httpc->closed = FALSE; return 0; } @@ -728,27 +576,22 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex, infof(conn->data, "http2_recv: %d bytes buffer\n", conn->proto.httpc.len); + rc = 0; nread = ((Curl_recv*)httpc->recv_underlying)(conn, FIRSTSOCKET, - httpc->inbuf, H2_BUFSIZE, - &result); - if(result == CURLE_AGAIN) { - *err = result; + httpc->inbuf, H2_BUFSIZE, &rc); + + if(rc == CURLE_AGAIN) { + *err = rc; return -1; } if(nread == -1) { failf(conn->data, "Failed receiving HTTP2 data"); - *err = result; + *err = rc; return 0; } infof(conn->data, "nread=%zd\n", nread); - - if(nread == 0) { - failf(conn->data, "EOF"); - return 0; - } - rv = nghttp2_session_mem_recv(httpc->h2, (const uint8_t *)httpc->inbuf, nread); @@ -772,19 +615,12 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex, /* If stream is closed, return 0 to signal the http routine to close the connection */ if(httpc->closed) { - /* Reset to FALSE to prevent infinite loop in readwrite_data - function. */ - httpc->closed = FALSE; return 0; } *err = CURLE_AGAIN; return -1; } -/* Index where :authority header field will appear in request header - field list. */ -#define AUTHORITY_DST_IDX 3 - /* return number of received (decrypted) bytes */ static ssize_t http2_send(struct connectdata *conn, int sockindex, const void *mem, size_t len, CURLcode *err) @@ -799,7 +635,6 @@ static ssize_t http2_send(struct connectdata *conn, int sockindex, nghttp2_nv *nva; size_t nheader; size_t i; - size_t authority_idx; char *hdbuf = (char*)mem; char *end; nghttp2_data_provider data_prd; @@ -870,13 +705,10 @@ static ssize_t http2_send(struct connectdata *conn, int sockindex, hdbuf = strchr(hdbuf, 0x0a); ++hdbuf; - authority_idx = 0; - for(i = 3; i < nheader; ++i) { end = strchr(hdbuf, ':'); assert(end); if(end - hdbuf == 4 && Curl_raw_nequal("host", hdbuf, 4)) { - authority_idx = i; nva[i].name = (unsigned char *)":authority"; nva[i].namelen = (uint16_t)strlen((char *)nva[i].name); } @@ -907,15 +739,6 @@ static ssize_t http2_send(struct connectdata *conn, int sockindex, } } - /* :authority must come before non-pseudo header fields */ - if(authority_idx != 0 && authority_idx != AUTHORITY_DST_IDX) { - nghttp2_nv authority = nva[authority_idx]; - for(i = authority_idx; i > AUTHORITY_DST_IDX; --i) { - nva[i] = nva[i - 1]; - } - nva[i] = authority; - } - switch(conn->data->set.httpreq) { case HTTPREQ_POST: case HTTPREQ_POST_FORM: @@ -980,20 +803,19 @@ CURLcode Curl_http2_setup(struct connectdata *conn) httpc->upload_mem = NULL; httpc->upload_len = 0; httpc->stream_id = -1; - httpc->status_code = -1; conn->httpversion = 20; - return 0; + /* Put place holder for status line */ + return Curl_add_buffer(httpc->header_recvbuf, "HTTP/2.0 200\r\n", 14); } -CURLcode Curl_http2_switched(struct connectdata *conn, - const char *mem, size_t nread) +int Curl_http2_switched(struct connectdata *conn) { - CURLcode result; + /* TODO: May get CURLE_AGAIN */ + CURLcode rc; struct http_conn *httpc = &conn->proto.httpc; int rv; - struct SessionHandle *data = conn->data; httpc->recv_underlying = (recving)conn->recv[FIRSTSOCKET]; httpc->send_underlying = (sending)conn->send[FIRSTSOCKET]; @@ -1004,16 +826,8 @@ CURLcode Curl_http2_switched(struct connectdata *conn, (conn, FIRSTSOCKET, NGHTTP2_CLIENT_CONNECTION_PREFACE, NGHTTP2_CLIENT_CONNECTION_PREFACE_LEN, - &result); - if(result) - /* TODO: This may get CURLE_AGAIN */ - return result; - - if(rv != 24) { - failf(data, "Only sent partial HTTP2 packet"); - return CURLE_SEND_ERROR; - } - + &rc); + assert(rv == 24); if(conn->data->req.upgr101 == UPGR101_RECEIVED) { /* stream 1 is opened implicitly on upgrade */ httpc->stream_id = 1; @@ -1021,9 +835,9 @@ CURLcode Curl_http2_switched(struct connectdata *conn, rv = nghttp2_session_upgrade(httpc->h2, httpc->binsettings, httpc->binlen, NULL); if(rv != 0) { - failf(data, "nghttp2_session_upgrade() failed: %s(%d)", + failf(conn->data, "nghttp2_session_upgrade() failed: %s(%d)", nghttp2_strerror(rv), rv); - return CURLE_HTTP2; + return -1; } } else { @@ -1031,21 +845,12 @@ CURLcode Curl_http2_switched(struct connectdata *conn, httpc->stream_id = -1; rv = nghttp2_submit_settings(httpc->h2, NGHTTP2_FLAG_NONE, NULL, 0); if(rv != 0) { - failf(data, "nghttp2_submit_settings() failed: %s(%d)", + failf(conn->data, "nghttp2_submit_settings() failed: %s(%d)", nghttp2_strerror(rv), rv); - return CURLE_HTTP2; + return -1; } } - - rv = (int)nghttp2_session_mem_recv(httpc->h2, (const uint8_t*)mem, nread); - - if(rv != (int)nread) { - failf(data, "nghttp2_session_mem_recv() failed: %s(%d)", - nghttp2_strerror(rv), rv); - return CURLE_HTTP2; - } - - return CURLE_OK; + return 0; } #endif diff --git a/lib/http2.h b/lib/http2.h index a2e4eb7..5c0ce8e 100644 --- a/lib/http2.h +++ b/lib/http2.h @@ -37,14 +37,13 @@ CURLcode Curl_http2_send_request(struct connectdata *conn); CURLcode Curl_http2_request_upgrade(Curl_send_buffer *req, struct connectdata *conn); CURLcode Curl_http2_setup(struct connectdata *conn); -CURLcode Curl_http2_switched(struct connectdata *conn, - const char *data, size_t nread); +int Curl_http2_switched(struct connectdata *conn); #else /* USE_NGHTTP2 */ #define Curl_http2_init(x) CURLE_UNSUPPORTED_PROTOCOL #define Curl_http2_send_request(x) CURLE_UNSUPPORTED_PROTOCOL #define Curl_http2_request_upgrade(x,y) CURLE_UNSUPPORTED_PROTOCOL #define Curl_http2_setup(x) CURLE_UNSUPPORTED_PROTOCOL -#define Curl_http2_switched(x,y,z) CURLE_UNSUPPORTED_PROTOCOL +#define Curl_http2_switched(x) (-1) #endif #endif /* HEADER_CURL_HTTP2_H */ diff --git a/lib/http_digest.c b/lib/http_digest.c index ba59e5d..55f5108 100644 --- a/lib/http_digest.c +++ b/lib/http_digest.c @@ -26,9 +26,14 @@ #include "urldata.h" #include "rawstr.h" -#include "curl_sasl.h" +#include "curl_base64.h" +#include "curl_md5.h" #include "http_digest.h" +#include "strtok.h" #include "curl_memory.h" +#include "vtls/vtls.h" /* for Curl_rand() */ +#include "non-ascii.h" /* included for Curl_convert_... prototypes */ +#include "warnless.h" #define _MPRINTF_REPLACE /* use our functions only */ #include @@ -36,6 +41,79 @@ /* The last #include file should be: */ #include "memdebug.h" +#define MAX_VALUE_LENGTH 256 +#define MAX_CONTENT_LENGTH 1024 + +static void digest_cleanup_one(struct digestdata *dig); + +/* + * Return 0 on success and then the buffers are filled in fine. + * + * Non-zero means failure to parse. + */ +static int get_pair(const char *str, char *value, char *content, + const char **endptr) +{ + int c; + bool starts_with_quote = FALSE; + bool escape = FALSE; + + for(c=MAX_VALUE_LENGTH-1; (*str && (*str != '=') && c--); ) + *value++ = *str++; + *value=0; + + if('=' != *str++) + /* eek, no match */ + return 1; + + if('\"' == *str) { + /* this starts with a quote so it must end with one as well! */ + str++; + starts_with_quote = TRUE; + } + + for(c=MAX_CONTENT_LENGTH-1; *str && c--; str++) { + switch(*str) { + case '\\': + if(!escape) { + /* possibly the start of an escaped quote */ + escape = TRUE; + *content++ = '\\'; /* even though this is an escape character, we still + store it as-is in the target buffer */ + continue; + } + break; + case ',': + if(!starts_with_quote) { + /* this signals the end of the content if we didn't get a starting + quote and then we do "sloppy" parsing */ + c=0; /* the end */ + continue; + } + break; + case '\r': + case '\n': + /* end of string */ + c=0; + continue; + case '\"': + if(!escape && starts_with_quote) { + /* end of string */ + c=0; + continue; + } + break; + } + escape = FALSE; + *content++ = *str; + } + *content=0; + + *endptr = str; + + return 0; /* all is fine! */ +} + /* Test example headers: WWW-Authenticate: Digest realm="testrealm", nonce="1053604598" @@ -43,31 +121,177 @@ Proxy-Authenticate: Digest realm="testrealm", nonce="1053604598" */ -CURLcode Curl_input_digest(struct connectdata *conn, - bool proxy, - const char *header) /* rest of the *-authenticate: - header */ +CURLdigest Curl_input_digest(struct connectdata *conn, + bool proxy, + const char *header) /* rest of the *-authenticate: + header */ { - struct SessionHandle *data = conn->data; - - /* Point to the correct struct with this */ - struct digestdata *digest; + char *token = NULL; + char *tmp = NULL; + bool foundAuth = FALSE; + bool foundAuthInt = FALSE; + struct SessionHandle *data=conn->data; + bool before = FALSE; /* got a nonce before */ + struct digestdata *d; if(proxy) { - digest = &data->state.proxydigest; + d = &data->state.proxydigest; } else { - digest = &data->state.digest; + d = &data->state.digest; } - if(!checkprefix("Digest", header)) - return CURLE_BAD_CONTENT_ENCODING; + if(checkprefix("Digest", header)) { + header += strlen("Digest"); + + /* If we already have received a nonce, keep that in mind */ + if(d->nonce) + before = TRUE; + + /* clear off any former leftovers and init to defaults */ + digest_cleanup_one(d); + + for(;;) { + char value[MAX_VALUE_LENGTH]; + char content[MAX_CONTENT_LENGTH]; + + while(*header && ISSPACE(*header)) + header++; + + /* extract a value=content pair */ + if(!get_pair(header, value, content, &header)) { + if(Curl_raw_equal(value, "nonce")) { + d->nonce = strdup(content); + if(!d->nonce) + return CURLDIGEST_NOMEM; + } + else if(Curl_raw_equal(value, "stale")) { + if(Curl_raw_equal(content, "true")) { + d->stale = TRUE; + d->nc = 1; /* we make a new nonce now */ + } + } + else if(Curl_raw_equal(value, "realm")) { + d->realm = strdup(content); + if(!d->realm) + return CURLDIGEST_NOMEM; + } + else if(Curl_raw_equal(value, "opaque")) { + d->opaque = strdup(content); + if(!d->opaque) + return CURLDIGEST_NOMEM; + } + else if(Curl_raw_equal(value, "qop")) { + char *tok_buf; + /* tokenize the list and choose auth if possible, use a temporary + clone of the buffer since strtok_r() ruins it */ + tmp = strdup(content); + if(!tmp) + return CURLDIGEST_NOMEM; + token = strtok_r(tmp, ",", &tok_buf); + while(token != NULL) { + if(Curl_raw_equal(token, "auth")) { + foundAuth = TRUE; + } + else if(Curl_raw_equal(token, "auth-int")) { + foundAuthInt = TRUE; + } + token = strtok_r(NULL, ",", &tok_buf); + } + free(tmp); + /*select only auth o auth-int. Otherwise, ignore*/ + if(foundAuth) { + d->qop = strdup("auth"); + if(!d->qop) + return CURLDIGEST_NOMEM; + } + else if(foundAuthInt) { + d->qop = strdup("auth-int"); + if(!d->qop) + return CURLDIGEST_NOMEM; + } + } + else if(Curl_raw_equal(value, "algorithm")) { + d->algorithm = strdup(content); + if(!d->algorithm) + return CURLDIGEST_NOMEM; + if(Curl_raw_equal(content, "MD5-sess")) + d->algo = CURLDIGESTALGO_MD5SESS; + else if(Curl_raw_equal(content, "MD5")) + d->algo = CURLDIGESTALGO_MD5; + else + return CURLDIGEST_BADALGO; + } + else { + /* unknown specifier, ignore it! */ + } + } + else + break; /* we're done here */ + + /* pass all additional spaces here */ + while(*header && ISSPACE(*header)) + header++; + if(',' == *header) + /* allow the list to be comma-separated */ + header++; + } + /* We had a nonce since before, and we got another one now without + 'stale=true'. This means we provided bad credentials in the previous + request */ + if(before && !d->stale) + return CURLDIGEST_BAD; + + /* We got this header without a nonce, that's a bad Digest line! */ + if(!d->nonce) + return CURLDIGEST_BAD; + } + else + /* else not a digest, get out */ + return CURLDIGEST_NONE; - header += strlen("Digest"); - while(*header && ISSPACE(*header)) - header++; + return CURLDIGEST_FINE; +} - return Curl_sasl_decode_digest_http_message(header, digest); +/* convert md5 chunk to RFC2617 (section 3.1.3) -suitable ascii string*/ +static void md5_to_ascii(unsigned char *source, /* 16 bytes */ + unsigned char *dest) /* 33 bytes */ +{ + int i; + for(i=0; i<16; i++) + snprintf((char *)&dest[i*2], 3, "%02x", source[i]); +} + +/* Perform quoted-string escaping as described in RFC2616 and its errata */ +static char *string_quoted(const char *source) +{ + char *dest, *d; + const char *s = source; + size_t n = 1; /* null terminator */ + + /* Calculate size needed */ + while(*s) { + ++n; + if(*s == '"' || *s == '\\') { + ++n; + } + ++s; + } + + dest = malloc(n); + if(dest) { + s = source; + d = dest; + while(*s) { + if(*s == '"' || *s == '\\') { + *d++ = '\\'; + } + *d++ = *s++; + } + *d = 0; + } + + return dest; } CURLcode Curl_output_digest(struct connectdata *conn, @@ -75,35 +299,49 @@ CURLcode Curl_output_digest(struct connectdata *conn, const unsigned char *request, const unsigned char *uripath) { - CURLcode result; - struct SessionHandle *data = conn->data; - unsigned char *path; - char *tmp; - char *response; - size_t len; - bool have_chlg; - - /* Point to the address of the pointer that holds the string to send to the - server, which is for a plain host or for a HTTP proxy */ + /* We have a Digest setup for this, use it! Now, to get all the details for + this sorted out, I must urge you dear friend to read up on the RFC2617 + section 3.2.2, */ + size_t urilen; + 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 */ + char cnoncebuf[33]; + char *cnonce = NULL; + size_t cnonce_sz = 0; + char *tmp = NULL; char **allocuserpwd; - - /* Point to the name and password for this */ + size_t userlen; const char *userp; + char *userp_quoted; const char *passwdp; - - /* Point to the correct struct with this */ - struct digestdata *digest; struct auth *authp; + struct SessionHandle *data = conn->data; + struct digestdata *d; + CURLcode rc; +/* The CURL_OUTPUT_DIGEST_CONV macro below is for non-ASCII machines. + It converts digest text to ASCII so the MD5 will be correct for + what ultimately goes over the network. +*/ +#define CURL_OUTPUT_DIGEST_CONV(a, b) \ + rc = Curl_convert_to_network(a, (char *)b, strlen((const char*)b)); \ + if(rc != CURLE_OK) { \ + free(b); \ + return rc; \ + } + if(proxy) { - digest = &data->state.proxydigest; + d = &data->state.proxydigest; allocuserpwd = &conn->allocptr.proxyuserpwd; userp = conn->proxyuser; passwdp = conn->proxypasswd; authp = &data->state.authproxy; } else { - digest = &data->state.digest; + d = &data->state.digest; allocuserpwd = &conn->allocptr.userpwd; userp = conn->user; passwdp = conn->passwd; @@ -114,21 +352,75 @@ CURLcode Curl_output_digest(struct connectdata *conn, /* not set means empty */ if(!userp) - userp = ""; + userp=""; if(!passwdp) - passwdp = ""; - -#if defined(USE_WINDOWS_SSPI) - have_chlg = digest->input_token ? TRUE : FALSE; -#else - have_chlg = digest->nonce ? TRUE : FALSE; -#endif + passwdp=""; - if(!have_chlg) { + if(!d->nonce) { authp->done = FALSE; return CURLE_OK; } + authp->done = TRUE; + + if(!d->nc) + d->nc = 1; + + if(!d->cnonce) { + snprintf(cnoncebuf, sizeof(cnoncebuf), "%08x%08x%08x%08x", + Curl_rand(data), Curl_rand(data), + Curl_rand(data), Curl_rand(data)); + rc = Curl_base64_encode(data, cnoncebuf, strlen(cnoncebuf), + &cnonce, &cnonce_sz); + if(rc) + return rc; + d->cnonce = cnonce; + } + + /* + if the algorithm is "MD5" or unspecified (which then defaults to MD5): + + A1 = unq(username-value) ":" unq(realm-value) ":" passwd + + if the algorithm is "MD5-sess" then: + + A1 = H( unq(username-value) ":" unq(realm-value) ":" passwd ) + ":" unq(nonce-value) ":" unq(cnonce-value) + */ + + md5this = (unsigned char *) + aprintf("%s:%s:%s", userp, d->realm, passwdp); + if(!md5this) + return CURLE_OUT_OF_MEMORY; + + CURL_OUTPUT_DIGEST_CONV(data, md5this); /* convert on non-ASCII machines */ + Curl_md5it(md5buf, md5this); + Curl_safefree(md5this); + md5_to_ascii(md5buf, ha1); + + if(d->algo == CURLDIGESTALGO_MD5SESS) { + /* nonce and cnonce are OUTSIDE the hash */ + tmp = aprintf("%s:%s:%s", ha1, d->nonce, d->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); + Curl_safefree(tmp); + md5_to_ascii(md5buf, ha1); + } + + /* + If the "qop" directive's value is "auth" or is unspecified, then A2 is: + + A2 = Method ":" digest-uri-value + + If the "qop" value is "auth-int", then A2 is: + + A2 = Method ":" digest-uri-value ":" H(entity-body) + + (The "Method" value is the HTTP request method as specified in section + 5.1.1 of RFC 2616) + */ /* So IE browsers < v7 cut off the URI part at the query part when they evaluate the MD5 and some (IIS?) servers work with them so we may need to @@ -143,39 +435,164 @@ CURLcode Curl_output_digest(struct connectdata *conn, http://www.fngtps.com/2006/09/http-authentication */ - if(authp->iestyle && ((tmp = strchr((char *)uripath, '?')) != NULL)) { - size_t urilen = tmp - (char *)uripath; + if(authp->iestyle && ((tmp = strchr((char *)uripath, '?')) != NULL)) + urilen = tmp - (char *)uripath; + else + urilen = strlen((char *)uripath); - path = (unsigned char *) aprintf("%.*s", urilen, uripath); + md5this = (unsigned char *)aprintf("%s:%.*s", request, urilen, uripath); + + if(d->qop && Curl_raw_equal(d->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"); + Curl_safefree(md5this); + md5this = md5this2; } - else - path = (unsigned char *) strdup((char *) uripath); - if(!path) + if(!md5this) + return CURLE_OUT_OF_MEMORY; + + CURL_OUTPUT_DIGEST_CONV(data, md5this); /* convert on non-ASCII machines */ + Curl_md5it(md5buf, md5this); + Curl_safefree(md5this); + md5_to_ascii(md5buf, ha2); + + if(d->qop) { + md5this = (unsigned char *)aprintf("%s:%s:%08x:%s:%s:%s", + ha1, + d->nonce, + d->nc, + d->cnonce, + d->qop, + ha2); + } + else { + md5this = (unsigned char *)aprintf("%s:%s:%s", + ha1, + d->nonce, + ha2); + } + if(!md5this) return CURLE_OUT_OF_MEMORY; - result = Curl_sasl_create_digest_http_message(data, userp, passwdp, request, - path, digest, &response, &len); - free(path); - if(result) - return result; + CURL_OUTPUT_DIGEST_CONV(data, md5this); /* convert on non-ASCII machines */ + Curl_md5it(md5buf, md5this); + Curl_safefree(md5this); + md5_to_ascii(md5buf, request_digest); + + /* for test case 64 (snooped from a Mozilla 1.3a request) + + Authorization: Digest username="testuser", realm="testrealm", \ + nonce="1053604145", uri="/64", response="c55f7f30d83d774a3d2dcacf725abaca" + + Digest parameters are all quoted strings. Username which is provided by + the user will need double quotes and backslashes within it escaped. For + the other fields, this shouldn't be an issue. realm, nonce, and opaque + are copied as is from the server, escapes and all. cnonce is generated + with web-safe characters. uri is already percent encoded. nc is 8 hex + characters. algorithm and qop with standard values only contain web-safe + chracters. + */ + userp_quoted = string_quoted(userp); + if(!userp_quoted) + return CURLE_OUT_OF_MEMORY; - *allocuserpwd = aprintf("%sAuthorization: Digest %s\r\n", - proxy ? "Proxy-" : "", - response); - free(response); + if(d->qop) { + *allocuserpwd = + aprintf( "%sAuthorization: Digest " + "username=\"%s\", " + "realm=\"%s\", " + "nonce=\"%s\", " + "uri=\"%.*s\", " + "cnonce=\"%s\", " + "nc=%08x, " + "qop=%s, " + "response=\"%s\"", + proxy?"Proxy-":"", + userp_quoted, + d->realm, + d->nonce, + urilen, uripath, /* this is the PATH part of the URL */ + d->cnonce, + d->nc, + d->qop, + request_digest); + + if(Curl_raw_equal(d->qop, "auth")) + d->nc++; /* The nc (from RFC) has to be a 8 hex digit number 0 padded + which tells to the server how many times you are using the + same nonce in the qop=auth mode. */ + } + else { + *allocuserpwd = + aprintf( "%sAuthorization: Digest " + "username=\"%s\", " + "realm=\"%s\", " + "nonce=\"%s\", " + "uri=\"%.*s\", " + "response=\"%s\"", + proxy?"Proxy-":"", + userp_quoted, + d->realm, + d->nonce, + urilen, uripath, /* this is the PATH part of the URL */ + request_digest); + } + Curl_safefree(userp_quoted); if(!*allocuserpwd) return CURLE_OUT_OF_MEMORY; - authp->done = TRUE; + /* Add optional fields */ + if(d->opaque) { + /* append opaque */ + tmp = aprintf("%s, opaque=\"%s\"", *allocuserpwd, d->opaque); + if(!tmp) + return CURLE_OUT_OF_MEMORY; + free(*allocuserpwd); + *allocuserpwd = tmp; + } + + if(d->algorithm) { + /* append algorithm */ + tmp = aprintf("%s, algorithm=\"%s\"", *allocuserpwd, d->algorithm); + if(!tmp) + return CURLE_OUT_OF_MEMORY; + free(*allocuserpwd); + *allocuserpwd = tmp; + } + + /* append CRLF + zero (3 bytes) to the userpwd header */ + userlen = strlen(*allocuserpwd); + tmp = realloc(*allocuserpwd, userlen + 3); + if(!tmp) + return CURLE_OUT_OF_MEMORY; + strcpy(&tmp[userlen], "\r\n"); /* append the data */ + *allocuserpwd = tmp; return CURLE_OK; } +static void digest_cleanup_one(struct digestdata *d) +{ + Curl_safefree(d->nonce); + Curl_safefree(d->cnonce); + Curl_safefree(d->realm); + Curl_safefree(d->opaque); + Curl_safefree(d->qop); + Curl_safefree(d->algorithm); + + d->nc = 0; + d->algo = CURLDIGESTALGO_MD5; /* default algorithm */ + d->stale = FALSE; /* default means normal, not stale */ +} + + void Curl_digest_cleanup(struct SessionHandle *data) { - Curl_sasl_digest_cleanup(&data->state.digest); - Curl_sasl_digest_cleanup(&data->state.proxydigest); + digest_cleanup_one(&data->state.digest); + digest_cleanup_one(&data->state.proxydigest); } #endif diff --git a/lib/http_digest.h b/lib/http_digest.h index d13d563..c6a4e91 100644 --- a/lib/http_digest.h +++ b/lib/http_digest.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2011, Daniel Stenberg, , 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,9 +23,24 @@ ***************************************************************************/ #include "curl_setup.h" +typedef enum { + CURLDIGEST_NONE, /* not a digest */ + CURLDIGEST_BAD, /* a digest, but one we don't like */ + CURLDIGEST_BADALGO, /* unsupported algorithm requested */ + CURLDIGEST_NOMEM, + CURLDIGEST_FINE, /* a digest we act on */ + + CURLDIGEST_LAST /* last entry in this enum, don't use */ +} CURLdigest; + +enum { + CURLDIGESTALGO_MD5, + CURLDIGESTALGO_MD5SESS +}; + /* this is for digest header input */ -CURLcode Curl_input_digest(struct connectdata *conn, - bool proxy, const char *header); +CURLdigest Curl_input_digest(struct connectdata *conn, + bool proxy, const char *header); /* this is for creating digest header output */ CURLcode Curl_output_digest(struct connectdata *conn, diff --git a/lib/http_negotiate.c b/lib/http_negotiate.c index 5967022..53df30e 100644 --- a/lib/http_negotiate.c +++ b/lib/http_negotiate.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , 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,7 +22,13 @@ #include "curl_setup.h" -#if defined(HAVE_GSSAPI) && !defined(CURL_DISABLE_HTTP) && defined(USE_SPNEGO) +#ifdef HAVE_GSSAPI +#ifdef HAVE_OLD_GSSMIT +#define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name +#define NCOMPAT 1 +#endif + +#ifndef CURL_DISABLE_HTTP #include "urldata.h" #include "sendf.h" @@ -33,6 +39,19 @@ #include "curl_memory.h" #include "url.h" +#ifdef HAVE_SPNEGO +# include +# ifdef USE_SSLEAY +# ifdef USE_OPENSSL +# include +# else +# include +# endif +# else +# error "Can't compile SPNEGO support without OpenSSL." +# endif +#endif + #define _MPRINTF_REPLACE /* use our functions only */ #include @@ -42,10 +61,24 @@ static int get_gss_name(struct connectdata *conn, bool proxy, gss_name_t *server) { + struct negotiatedata *neg_ctx = proxy?&conn->data->state.proxyneg: + &conn->data->state.negotiate; OM_uint32 major_status, minor_status; gss_buffer_desc token = GSS_C_EMPTY_BUFFER; char name[2048]; - const char* service = "HTTP"; + const char* service; + + /* GSSAPI implementation by Globus (known as GSI) requires the name to be + of form "/" instead of @ (ie. slash instead + of at-sign). Also GSI servers are often identified as 'host' not 'khttp'. + Change following lines if you want to use GSI */ + + /* IIS uses the @ form but uses 'http' as the service name */ + + if(neg_ctx->gss) + service = "KHTTP"; + else + service = "HTTP"; token.length = strlen(service) + 1 + strlen(proxy ? conn->proxy.name : conn->host.name) + 1; @@ -64,6 +97,36 @@ get_gss_name(struct connectdata *conn, bool proxy, gss_name_t *server) return GSS_ERROR(major_status) ? -1 : 0; } +static void +log_gss_error(struct connectdata *conn, OM_uint32 error_status, + const char *prefix) +{ + OM_uint32 maj_stat, min_stat; + OM_uint32 msg_ctx = 0; + gss_buffer_desc status_string; + char buf[1024]; + size_t len; + + snprintf(buf, sizeof(buf), "%s", prefix); + len = strlen(buf); + do { + maj_stat = gss_display_status(&min_stat, + error_status, + GSS_C_MECH_CODE, + GSS_C_NO_OID, + &msg_ctx, + &status_string); + if(sizeof(buf) > len + status_string.length + 1) { + snprintf(buf + len, sizeof(buf) - len, + ": %s", (char*) status_string.value); + len += status_string.length; + } + gss_release_buffer(&min_stat, &status_string); + } while(!GSS_ERROR(maj_stat) && msg_ctx != 0); + + infof(conn->data, "%s\n", buf); +} + /* returning zero (0) means success, everything else is treated as "failure" with no care exactly what the failure was */ int Curl_input_negotiate(struct connectdata *conn, bool proxy, @@ -78,7 +141,30 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy, int ret; size_t len; size_t rawlen = 0; - CURLcode result; + bool gss; + const char* protocol; + CURLcode error; + + if(checkprefix("GSS-Negotiate", header)) { + protocol = "GSS-Negotiate"; + gss = TRUE; + } + else if(checkprefix("Negotiate", header)) { + protocol = "Negotiate"; + gss = FALSE; + } + else + return -1; + + if(neg_ctx->context) { + if(neg_ctx->gss != gss) { + return -1; + } + } + else { + neg_ctx->protocol = protocol; + neg_ctx->gss = gss; + } if(neg_ctx->context && neg_ctx->status == GSS_S_COMPLETE) { /* We finished successfully our part of authentication, but server @@ -92,30 +178,75 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy, (ret = get_gss_name(conn, proxy, &neg_ctx->server_name))) return ret; - header += strlen("Negotiate"); + header += strlen(neg_ctx->protocol); while(*header && ISSPACE(*header)) header++; len = strlen(header); if(len > 0) { - result = Curl_base64_decode(header, (unsigned char **)&input_token.value, - &rawlen); - if(result || rawlen == 0) + error = Curl_base64_decode(header, + (unsigned char **)&input_token.value, &rawlen); + if(error || rawlen == 0) return -1; input_token.length = rawlen; DEBUGASSERT(input_token.value != NULL); + +#ifdef HAVE_SPNEGO /* Handle SPNEGO */ + if(checkprefix("Negotiate", header)) { + unsigned char *spnegoToken = NULL; + size_t spnegoTokenLength = 0; + gss_buffer_desc mechToken = GSS_C_EMPTY_BUFFER; + + spnegoToken = malloc(input_token.length); + if(spnegoToken == NULL) { + Curl_safefree(input_token.value); + return CURLE_OUT_OF_MEMORY; + } + memcpy(spnegoToken, input_token.value, input_token.length); + spnegoTokenLength = input_token.length; + + if(!parseSpnegoTargetToken(spnegoToken, + spnegoTokenLength, + NULL, + NULL, + (unsigned char**)&mechToken.value, + &mechToken.length, + NULL, + NULL)) { + Curl_safefree(spnegoToken); + infof(data, "Parse SPNEGO Target Token failed\n"); + } + else if(!mechToken.value || !mechToken.length) { + Curl_safefree(spnegoToken); + if(mechToken.value) + gss_release_buffer(&discard_st, &mechToken); + infof(data, "Parse SPNEGO Target Token succeeded (NULL token)\n"); + } + else { + Curl_safefree(spnegoToken); + Curl_safefree(input_token.value); + input_token.value = malloc(mechToken.length); + if(input_token.value == NULL) { + gss_release_buffer(&discard_st, &mechToken); + return CURLE_OUT_OF_MEMORY; + } + memcpy(input_token.value, mechToken.value, mechToken.length); + input_token.length = mechToken.length; + gss_release_buffer(&discard_st, &mechToken); + infof(data, "Parse SPNEGO Target Token succeeded\n"); + } + } +#endif } major_status = Curl_gss_init_sec_context(data, &minor_status, &neg_ctx->context, neg_ctx->server_name, - &Curl_spnego_mech_oid, GSS_C_NO_CHANNEL_BINDINGS, &input_token, &output_token, - TRUE, NULL); Curl_safefree(input_token.value); @@ -123,8 +254,7 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy, if(GSS_ERROR(major_status)) { if(output_token.value) gss_release_buffer(&discard_st, &output_token); - Curl_gss_log_error(conn->data, minor_status, - "gss_init_sec_context() failed: "); + log_gss_error(conn, minor_status, "gss_init_sec_context() failed: "); return -1; } @@ -146,18 +276,64 @@ CURLcode Curl_output_negotiate(struct connectdata *conn, bool proxy) char *encoded = NULL; size_t len = 0; char *userp; - CURLcode result; + CURLcode error; OM_uint32 discard_st; - result = Curl_base64_encode(conn->data, - neg_ctx->output_token.value, - neg_ctx->output_token.length, - &encoded, &len); - if(result) { +#ifdef HAVE_SPNEGO /* Handle SPNEGO */ + if(checkprefix("Negotiate", neg_ctx->protocol)) { + ASN1_OBJECT *object = NULL; + unsigned char *responseToken = NULL; + size_t responseTokenLength = 0; + gss_buffer_desc spnegoToken = GSS_C_EMPTY_BUFFER; + + responseToken = malloc(neg_ctx->output_token.length); + if(responseToken == NULL) + return CURLE_OUT_OF_MEMORY; + memcpy(responseToken, neg_ctx->output_token.value, + neg_ctx->output_token.length); + responseTokenLength = neg_ctx->output_token.length; + + object = OBJ_txt2obj("1.2.840.113554.1.2.2", 1); + if(!object) { + Curl_safefree(responseToken); + return CURLE_OUT_OF_MEMORY; + } + + if(!makeSpnegoInitialToken(object, + responseToken, + responseTokenLength, + (unsigned char**)&spnegoToken.value, + &spnegoToken.length)) { + Curl_safefree(responseToken); + ASN1_OBJECT_free(object); + infof(conn->data, "Make SPNEGO Initial Token failed\n"); + } + else if(!spnegoToken.value || !spnegoToken.length) { + Curl_safefree(responseToken); + ASN1_OBJECT_free(object); + if(spnegoToken.value) + gss_release_buffer(&discard_st, &spnegoToken); + infof(conn->data, "Make SPNEGO Initial Token succeeded (NULL token)\n"); + } + else { + Curl_safefree(responseToken); + ASN1_OBJECT_free(object); + gss_release_buffer(&discard_st, &neg_ctx->output_token); + neg_ctx->output_token.value = spnegoToken.value; + neg_ctx->output_token.length = spnegoToken.length; + infof(conn->data, "Make SPNEGO Initial Token succeeded\n"); + } + } +#endif + error = Curl_base64_encode(conn->data, + neg_ctx->output_token.value, + neg_ctx->output_token.length, + &encoded, &len); + if(error) { gss_release_buffer(&discard_st, &neg_ctx->output_token); neg_ctx->output_token.value = NULL; neg_ctx->output_token.length = 0; - return result; + return error; } if(!encoded || !len) { @@ -167,8 +343,8 @@ CURLcode Curl_output_negotiate(struct connectdata *conn, bool proxy) return CURLE_REMOTE_ACCESS_DENIED; } - userp = aprintf("%sAuthorization: Negotiate %s\r\n", proxy ? "Proxy-" : "", - encoded); + userp = aprintf("%sAuthorization: %s %s\r\n", proxy ? "Proxy-" : "", + neg_ctx->protocol, encoded); if(proxy) { Curl_safefree(conn->allocptr.proxyuserpwd); conn->allocptr.proxyuserpwd = userp; @@ -179,6 +355,7 @@ CURLcode Curl_output_negotiate(struct connectdata *conn, bool proxy) } Curl_safefree(encoded); + Curl_cleanup_negotiate(conn->data); return (userp == NULL) ? CURLE_OUT_OF_MEMORY : CURLE_OK; } @@ -204,4 +381,6 @@ void Curl_cleanup_negotiate(struct SessionHandle *data) cleanup(&data->state.proxyneg); } -#endif /* HAVE_GSSAPI && !CURL_DISABLE_HTTP && USE_SPNEGO */ + +#endif +#endif diff --git a/lib/http_negotiate.h b/lib/http_negotiate.h index f7efe8c..e584d76 100644 --- a/lib/http_negotiate.h +++ b/lib/http_negotiate.h @@ -22,7 +22,7 @@ * ***************************************************************************/ -#ifdef USE_SPNEGO +#ifdef USE_HTTP_NEGOTIATE /* this is for Negotiate header input */ int Curl_input_negotiate(struct connectdata *conn, bool proxy, @@ -37,6 +37,6 @@ void Curl_cleanup_negotiate(struct SessionHandle *data); #define GSS_ERROR(status) (status & 0x80000000) #endif -#endif /* USE_SPNEGO */ +#endif /* USE_HTTP_NEGOTIATE */ #endif /* HEADER_CURL_HTTP_NEGOTIATE_H */ diff --git a/lib/http_negotiate_sspi.c b/lib/http_negotiate_sspi.c index d651ac9..8396a61 100644 --- a/lib/http_negotiate_sspi.c +++ b/lib/http_negotiate_sspi.c @@ -24,14 +24,13 @@ #ifdef USE_WINDOWS_SSPI -#if !defined(CURL_DISABLE_HTTP) && defined(USE_SPNEGO) +#if !defined(CURL_DISABLE_HTTP) && defined(USE_HTTP_NEGOTIATE) #include "urldata.h" #include "sendf.h" #include "rawstr.h" #include "warnless.h" #include "curl_base64.h" -#include "curl_sasl.h" #include "http_negotiate.h" #include "curl_memory.h" #include "curl_multibyte.h" @@ -42,47 +41,84 @@ /* The last #include file should be: */ #include "memdebug.h" +static int +get_gss_name(struct connectdata *conn, bool proxy, + struct negotiatedata *neg_ctx) +{ + const char* service; + size_t length; + + if(proxy && !conn->proxy.name) + /* proxy auth requested but no given proxy name, error out! */ + return -1; + + /* GSSAPI implementation by Globus (known as GSI) requires the name to be + of form "/" instead of @ (ie. slash instead + of at-sign). Also GSI servers are often identified as 'host' not 'khttp'. + Change following lines if you want to use GSI */ + + /* IIS uses the @ form but uses 'http' as the service name, + and SSPI then generates an NTLM token. When using / a + Kerberos token is generated. */ + + if(neg_ctx->gss) + service = "KHTTP"; + else + service = "HTTP"; + + length = strlen(service) + 1 + strlen(proxy ? conn->proxy.name : + conn->host.name) + 1; + if(length + 1 > sizeof(neg_ctx->server_name)) + return EMSGSIZE; + + snprintf(neg_ctx->server_name, sizeof(neg_ctx->server_name), "%s/%s", + service, proxy ? conn->proxy.name : conn->host.name); + + return 0; +} + /* returning zero (0) means success, everything else is treated as "failure" with no care exactly what the failure was */ int Curl_input_negotiate(struct connectdata *conn, bool proxy, const char *header) { - BYTE *input_token = NULL; + struct negotiatedata *neg_ctx = proxy?&conn->data->state.proxyneg: + &conn->data->state.negotiate; + BYTE *input_token = 0; SecBufferDesc out_buff_desc; SecBuffer out_sec_buff; SecBufferDesc in_buff_desc; SecBuffer in_sec_buff; unsigned long context_attributes; - TimeStamp expiry; + TimeStamp lifetime; + TCHAR *sname; int ret; size_t len = 0, input_token_len = 0; + bool gss = FALSE; + const char* protocol; CURLcode error; - /* Point to the username and password */ - const char *userp; - const char *passwdp; - - /* Point to the correct struct with this */ - struct negotiatedata *neg_ctx; + if(checkprefix("GSS-Negotiate", header)) { + protocol = "GSS-Negotiate"; + gss = TRUE; + } + else if(checkprefix("Negotiate", header)) { + protocol = "Negotiate"; + gss = FALSE; + } + else + return -1; - if(proxy) { - userp = conn->proxyuser; - passwdp = conn->proxypasswd; - neg_ctx = &conn->data->state.proxyneg; + if(neg_ctx->context) { + if(neg_ctx->gss != gss) { + return -1; + } } else { - userp = conn->user; - passwdp = conn->passwd; - neg_ctx = &conn->data->state.negotiate; + neg_ctx->protocol = protocol; + neg_ctx->gss = gss; } - /* Not set means empty */ - if(!userp) - userp = ""; - - if(!passwdp) - passwdp = ""; - if(neg_ctx->context && neg_ctx->status == SEC_E_OK) { /* We finished successfully our part of authentication, but server * rejected it (since we're again here). Exit with an error since we @@ -91,119 +127,102 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy, return -1; } - if(!neg_ctx->server_name) { - /* Check proxy auth requested but no given proxy name */ - if(proxy && !conn->proxy.name) - return -1; - - /* Generate our SPN */ - neg_ctx->server_name = Curl_sasl_build_spn("HTTP", - proxy ? conn->proxy.name : - conn->host.name); - if(!neg_ctx->server_name) - return -1; + if(0 == strlen(neg_ctx->server_name)) { + ret = get_gss_name(conn, proxy, neg_ctx); + if(ret) + return ret; } if(!neg_ctx->output_token) { PSecPkgInfo SecurityPackage; - ret = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT(SP_NAME_NEGOTIATE), + ret = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT("Negotiate"), &SecurityPackage); if(ret != SEC_E_OK) return -1; /* Allocate input and output buffers according to the max token size as indicated by the security package */ - neg_ctx->token_max = SecurityPackage->cbMaxToken; - neg_ctx->output_token = malloc(neg_ctx->token_max); + neg_ctx->max_token_length = SecurityPackage->cbMaxToken; + neg_ctx->output_token = malloc(neg_ctx->max_token_length); s_pSecFn->FreeContextBuffer(SecurityPackage); } /* Obtain the input token, if any */ - header += strlen("Negotiate"); + header += strlen(neg_ctx->protocol); while(*header && ISSPACE(*header)) header++; len = strlen(header); if(!len) { - /* Is this the first call in a new negotiation? */ - if(neg_ctx->context) { - /* The server rejected our authentication and hasn't suppled any more - negotiation mechanisms */ - return -1; - } + /* first call in a new negotation, we have to acquire credentials, + and allocate memory for the context */ - /* We have to acquire credentials and allocate memory for the context */ neg_ctx->credentials = malloc(sizeof(CredHandle)); neg_ctx->context = malloc(sizeof(CtxtHandle)); if(!neg_ctx->credentials || !neg_ctx->context) return -1; - if(userp && *userp) { - /* Populate our identity structure */ - error = Curl_create_sspi_identity(userp, passwdp, &neg_ctx->identity); - if(error) - return -1; - - /* Allow proper cleanup of the identity structure */ - neg_ctx->p_identity = &neg_ctx->identity; - } - else - /* Use the current Windows user */ - neg_ctx->p_identity = NULL; - - /* Acquire our credientials handle */ neg_ctx->status = s_pSecFn->AcquireCredentialsHandle(NULL, - (TCHAR *) TEXT(SP_NAME_NEGOTIATE), - SECPKG_CRED_OUTBOUND, NULL, - neg_ctx->p_identity, NULL, NULL, - neg_ctx->credentials, &expiry); + (TCHAR *) TEXT("Negotiate"), + SECPKG_CRED_OUTBOUND, NULL, NULL, + NULL, NULL, neg_ctx->credentials, + &lifetime); if(neg_ctx->status != SEC_E_OK) return -1; } else { + input_token = malloc(neg_ctx->max_token_length); + if(!input_token) + return -1; + error = Curl_base64_decode(header, (unsigned char **)&input_token, &input_token_len); - if(error || !input_token_len) + if(error || input_token_len == 0) return -1; } - /* Setup the "output" security buffer */ - out_buff_desc.ulVersion = SECBUFFER_VERSION; + /* prepare the output buffers, and input buffers if present */ + out_buff_desc.ulVersion = 0; out_buff_desc.cBuffers = 1; out_buff_desc.pBuffers = &out_sec_buff; + + out_sec_buff.cbBuffer = curlx_uztoul(neg_ctx->max_token_length); out_sec_buff.BufferType = SECBUFFER_TOKEN; out_sec_buff.pvBuffer = neg_ctx->output_token; - out_sec_buff.cbBuffer = curlx_uztoul(neg_ctx->token_max); - /* Setup the "input" security buffer if present */ + if(input_token) { - in_buff_desc.ulVersion = SECBUFFER_VERSION; + in_buff_desc.ulVersion = 0; in_buff_desc.cBuffers = 1; in_buff_desc.pBuffers = &in_sec_buff; + + in_sec_buff.cbBuffer = curlx_uztoul(input_token_len); in_sec_buff.BufferType = SECBUFFER_TOKEN; in_sec_buff.pvBuffer = input_token; - in_sec_buff.cbBuffer = curlx_uztoul(input_token_len); } - /* Generate our message */ + sname = Curl_convert_UTF8_to_tchar(neg_ctx->server_name); + if(!sname) + return CURLE_OUT_OF_MEMORY; + neg_ctx->status = s_pSecFn->InitializeSecurityContext( neg_ctx->credentials, - input_token ? neg_ctx->context : NULL, - neg_ctx->server_name, + input_token ? neg_ctx->context : 0, + sname, ISC_REQ_CONFIDENTIALITY, 0, SECURITY_NATIVE_DREP, - input_token ? &in_buff_desc : NULL, + input_token ? &in_buff_desc : 0, 0, neg_ctx->context, &out_buff_desc, &context_attributes, - &expiry); + &lifetime); - Curl_safefree(input_token); + Curl_unicodefree(sname); if(GSS_ERROR(neg_ctx->status)) return -1; @@ -238,50 +257,41 @@ CURLcode Curl_output_negotiate(struct connectdata *conn, bool proxy) if(error) return error; - if(!len) + if(len == 0) return CURLE_REMOTE_ACCESS_DENIED; - userp = aprintf("%sAuthorization: Negotiate %s\r\n", proxy ? "Proxy-" : "", - encoded); + userp = aprintf("%sAuthorization: %s %s\r\n", proxy ? "Proxy-" : "", + neg_ctx->protocol, encoded); - if(proxy) { - Curl_safefree(conn->allocptr.proxyuserpwd); + if(proxy) conn->allocptr.proxyuserpwd = userp; - } - else { - Curl_safefree(conn->allocptr.userpwd); + else conn->allocptr.userpwd = userp; - } free(encoded); + Curl_cleanup_negotiate (conn->data); return (userp == NULL) ? CURLE_OUT_OF_MEMORY : CURLE_OK; } static void cleanup(struct negotiatedata *neg_ctx) { - /* Free our security context */ if(neg_ctx->context) { s_pSecFn->DeleteSecurityContext(neg_ctx->context); free(neg_ctx->context); - neg_ctx->context = NULL; + neg_ctx->context = 0; } - /* Free our credentials handle */ if(neg_ctx->credentials) { s_pSecFn->FreeCredentialsHandle(neg_ctx->credentials); free(neg_ctx->credentials); - neg_ctx->credentials = NULL; + neg_ctx->credentials = 0; } - /* Free our identity */ - Curl_sspi_free_identity(neg_ctx->p_identity); - neg_ctx->p_identity = NULL; - - /* Free the SPN and output token */ - Curl_safefree(neg_ctx->server_name); - Curl_safefree(neg_ctx->output_token); + if(neg_ctx->output_token) { + free(neg_ctx->output_token); + neg_ctx->output_token = 0; + } - /* Reset any variables */ - neg_ctx->token_max = 0; + neg_ctx->max_token_length = 0; } void Curl_cleanup_negotiate(struct SessionHandle *data) @@ -290,6 +300,6 @@ void Curl_cleanup_negotiate(struct SessionHandle *data) cleanup(&data->state.proxyneg); } -#endif /* !CURL_DISABLE_HTTP && USE_SPNEGO */ +#endif /* !CURL_DISABLE_HTTP && USE_HTTP_NEGOTIATE */ #endif /* USE_WINDOWS_SSPI */ diff --git a/lib/http_proxy.c b/lib/http_proxy.c index 1828f4c..a98c68c 100644 --- a/lib/http_proxy.c +++ b/lib/http_proxy.c @@ -98,6 +98,8 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, struct SessionHandle *data=conn->data; struct SingleRequest *k = &data->req; CURLcode result; + long timeout = + data->set.timeout?data->set.timeout:PROXY_TIMEOUT; /* in milliseconds */ curl_socket_t tunnelsocket = conn->sock[sockindex]; curl_off_t cl=0; bool closeConnection = FALSE; @@ -148,7 +150,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, free(host_port); - if(!result) { + if(CURLE_OK == result) { char *host=(char *)""; const char *proxyconn=""; const char *useragent=""; @@ -193,18 +195,18 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, useragent, proxyconn); - if(host) + if(host && *host) free(host); free(hostheader); - if(!result) + if(CURLE_OK == result) result = Curl_add_custom_headers(conn, TRUE, req_buffer); - if(!result) + if(CURLE_OK == result) /* CRLF terminate the request */ result = Curl_add_bufferf(req_buffer, "\r\n"); - if(!result) { + if(CURLE_OK == result) { /* Send the connect request to the proxy */ /* BLOCKING */ result = @@ -221,25 +223,14 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, return result; conn->tunnel_state[sockindex] = TUNNEL_CONNECT; - } /* END CONNECT PHASE */ - - check = Curl_timeleft(data, NULL, TRUE); - if(check <= 0) { - failf(data, "Proxy CONNECT aborted due to timeout"); - return CURLE_RECV_ERROR; - } - if(0 == Curl_socket_ready(tunnelsocket, CURL_SOCKET_BAD, 0)) - /* return so we'll be called again polling-style */ + /* now we've issued the CONNECT and we're waiting to hear back, return + and get called again polling-style */ return CURLE_OK; - else { - DEBUGF(infof(data, - "Read response immediately from proxy CONNECT\n")); - } - /* at this point, the tunnel_connecting phase is over. */ + } /* END CONNECT PHASE */ - { /* READING RESPONSE PHASE */ + { /* BEGIN NEGOTIATION PHASE */ size_t nread; /* total size read */ int perline; /* count bytes per line */ int keepon=TRUE; @@ -252,10 +243,13 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, nread=0; perline=0; + keepon=TRUE; while((nreadnow); /* spent time */ if(check <= 0) { failf(data, "Proxy CONNECT aborted due to timeout"); error = SELECT_TIMEOUT; /* already too little time */ @@ -285,7 +279,6 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, /* proxy auth was requested and there was proxy auth available, then deem this as "mere" proxy disconnect */ conn->bits.proxy_connect_closed = TRUE; - infof(data, "Proxy CONNECT connection closed"); } else { error = SELECT_ERROR; @@ -534,7 +527,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, conn->sock[sockindex] = CURL_SOCKET_BAD; break; } - } /* END READING RESPONSE PHASE */ + } /* END NEGOTIATION PHASE */ /* 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 @@ -549,33 +542,22 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, } while(data->req.newurl); if(200 != data->req.httpcode) { - if(closeConnection && data->req.newurl) { + failf(data, "Received HTTP code %d from proxy after CONNECT", + data->req.httpcode); + + if(closeConnection && data->req.newurl) conn->bits.proxy_connect_closed = TRUE; - infof(data, "Connect me again please\n"); - } - else { - if(data->req.newurl) { - /* this won't be used anymore for the CONNECT so free it now */ - free(data->req.newurl); - data->req.newurl = NULL; - } - /* failure, close this connection to avoid re-use */ - connclose(conn, "proxy CONNECT failure"); - Curl_closesocket(conn, conn->sock[sockindex]); - conn->sock[sockindex] = CURL_SOCKET_BAD; + + if(data->req.newurl) { + /* this won't be used anymore for the CONNECT so free it now */ + free(data->req.newurl); + data->req.newurl = NULL; } /* to back to init state */ conn->tunnel_state[sockindex] = 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; - } + return CURLE_RECV_ERROR; } conn->tunnel_state[sockindex] = TUNNEL_COMPLETE; diff --git a/lib/idn_win32.c b/lib/idn_win32.c index b369723..464964b 100644 --- a/lib/idn_win32.c +++ b/lib/idn_win32.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * 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 @@ -35,31 +35,8 @@ #include "memdebug.h" #ifdef WANT_IDN_PROTOTYPES -# if defined(_SAL_VERSION) -WINNORMALIZEAPI int WINAPI -IdnToAscii(_In_ DWORD dwFlags, - _In_reads_(cchUnicodeChar) LPCWSTR lpUnicodeCharStr, - _In_ int cchUnicodeChar, - _Out_writes_opt_(cchASCIIChar) LPWSTR lpASCIICharStr, - _In_ int cchASCIIChar); -WINNORMALIZEAPI int WINAPI -IdnToUnicode(_In_ DWORD dwFlags, - _In_reads_(cchASCIIChar) LPCWSTR lpASCIICharStr, - _In_ int cchASCIIChar, - _Out_writes_opt_(cchUnicodeChar) LPWSTR lpUnicodeCharStr, - _In_ int cchUnicodeChar); -# else -WINBASEAPI int WINAPI IdnToAscii(DWORD dwFlags, - const WCHAR *lpUnicodeCharStr, - int cchUnicodeChar, - WCHAR *lpASCIICharStr, - int cchASCIIChar); -WINBASEAPI int WINAPI IdnToUnicode(DWORD dwFlags, - const WCHAR *lpASCIICharStr, - int cchASCIIChar, - WCHAR *lpUnicodeCharStr, - int cchUnicodeChar); -# endif +WINBASEAPI int WINAPI IdnToAscii(DWORD, const WCHAR *, int, WCHAR *, int); +WINBASEAPI int WINAPI IdnToUnicode(DWORD, const WCHAR *, int, WCHAR *, int); #endif #define IDN_MAX_LENGTH 255 diff --git a/lib/if2ip.c b/lib/if2ip.c index 389feed..05ae7d6 100644 --- a/lib/if2ip.c +++ b/lib/if2ip.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -63,38 +63,6 @@ /* ------------------------------------------------------------------ */ -/* Return the scope of the given address. */ -unsigned int Curl_ipv6_scope(const struct sockaddr *sa) -{ -#ifndef ENABLE_IPV6 - (void) sa; -#else - if(sa->sa_family == AF_INET6) { - const struct sockaddr_in6 * sa6 = (const struct sockaddr_in6 *) sa; - const unsigned char * b = sa6->sin6_addr.s6_addr; - unsigned short w = (unsigned short) ((b[0] << 8) | b[1]); - - switch(w & 0xFFC0) { - case 0xFE80: - return IPV6_SCOPE_LINKLOCAL; - case 0xFEC0: - return IPV6_SCOPE_SITELOCAL; - case 0x0000: - w = b[1] | b[2] | b[3] | b[4] | b[5] | b[6] | b[7] | b[8] | b[9] | - b[10] | b[11] | b[12] | b[13] | b[14]; - if(w || b[15] != 0x01) - break; - return IPV6_SCOPE_NODELOCAL; - default: - break; - } - } -#endif - - return IPV6_SCOPE_GLOBAL; -} - - #if defined(HAVE_GETIFADDRS) bool Curl_if_is_interface_name(const char *interf) @@ -116,58 +84,41 @@ bool Curl_if_is_interface_name(const char *interf) } if2ip_result_t Curl_if2ip(int af, unsigned int remote_scope, - unsigned int remote_scope_id, const char *interf, - char *buf, int buf_size) + const char *interf, char *buf, int buf_size) { struct ifaddrs *iface, *head; if2ip_result_t res = IF2IP_NOT_FOUND; #ifndef ENABLE_IPV6 (void) remote_scope; - -#ifndef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID - (void) remote_scope_id; -#endif - #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(curl_strequal(iface->ifa_name, interf)) { void *addr; char *ip; - char scope[12] = ""; + char scope[12]=""; char ipstr[64]; #ifdef ENABLE_IPV6 if(af == AF_INET6) { unsigned int scopeid = 0; - unsigned int ifscope = Curl_ipv6_scope(iface->ifa_addr); - - if(ifscope != remote_scope) { - /* We are interested only in interface addresses whose - scope matches the remote address we want to - connect to: global for global, link-local for - link-local, etc... */ - if(res == IF2IP_NOT_FOUND) res = IF2IP_AF_NOT_SUPPORTED; - continue; - } - addr = &((struct sockaddr_in6 *)iface->ifa_addr)->sin6_addr; #ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID /* Include the scope of this interface as part of the address */ scopeid = ((struct sockaddr_in6 *)iface->ifa_addr)->sin6_scope_id; - - /* If given, scope id should match. */ - if(remote_scope_id && scopeid != remote_scope_id) { - if(res == IF2IP_NOT_FOUND) - res = IF2IP_AF_NOT_SUPPORTED; - +#endif + if(scopeid != remote_scope) { + /* We are interested only in interface addresses whose + scope ID matches the remote address we want to + connect to: global (0) for global, link-local for + link-local, etc... */ + if(res == IF2IP_NOT_FOUND) res = IF2IP_AF_NOT_SUPPORTED; continue; } -#endif if(scopeid) snprintf(scope, sizeof(scope), "%%%u", scopeid); } @@ -186,10 +137,8 @@ if2ip_result_t Curl_if2ip(int af, unsigned int remote_scope, } } } - freeifaddrs(head); } - return res; } @@ -200,13 +149,12 @@ bool Curl_if_is_interface_name(const char *interf) /* This is here just to support the old interfaces */ char buf[256]; - return (Curl_if2ip(AF_INET, 0 /* unused */, 0, interf, buf, sizeof(buf)) == + return (Curl_if2ip(AF_INET, 0, interf, buf, sizeof(buf)) == IF2IP_NOT_FOUND) ? FALSE : TRUE; } if2ip_result_t Curl_if2ip(int af, unsigned int remote_scope, - unsigned int remote_scope_id, const char *interf, - char *buf, int buf_size) + const char *interf, char *buf, int buf_size) { struct ifreq req; struct in_addr in; @@ -215,7 +163,6 @@ if2ip_result_t Curl_if2ip(int af, unsigned int remote_scope, size_t len; (void)remote_scope; - (void)remote_scope_id; if(!interf || (af != AF_INET)) return IF2IP_NOT_FOUND; @@ -258,12 +205,10 @@ bool Curl_if_is_interface_name(const char *interf) } if2ip_result_t Curl_if2ip(int af, unsigned int remote_scope, - unsigned int remote_scope_id, const char *interf, - char *buf, int buf_size) + const char *interf, char *buf, int buf_size) { (void) af; (void) remote_scope; - (void) remote_scope_id; (void) interf; (void) buf; (void) buf_size; diff --git a/lib/if2ip.h b/lib/if2ip.h index 78bb0bd..ac58752 100644 --- a/lib/if2ip.h +++ b/lib/if2ip.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * 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 @@ -23,14 +23,6 @@ ***************************************************************************/ #include "curl_setup.h" -/* IPv6 address scopes. */ -#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. */ - -unsigned int Curl_ipv6_scope(const struct sockaddr *sa); - bool Curl_if_is_interface_name(const char *interf); typedef enum { @@ -40,8 +32,7 @@ typedef enum { } if2ip_result_t; if2ip_result_t Curl_if2ip(int af, unsigned int remote_scope, - unsigned int remote_scope_id, const char *interf, - char *buf, int buf_size); + const char *interf, char *buf, int buf_size); #ifdef __INTERIX diff --git a/lib/imap.c b/lib/imap.c index 767ac80..0570ecc 100644 --- a/lib/imap.c +++ b/lib/imap.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * 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 @@ -24,7 +24,6 @@ * RFC3501 IMAPv4 protocol * RFC4422 Simple Authentication and Security Layer (SASL) * RFC4616 PLAIN authentication - * RFC4752 The Kerberos V5 ("GSSAPI") SASL Mechanism * RFC4959 IMAP Extension for SASL Initial Client Response * RFC5092 IMAP URL Scheme * RFC6749 OAuth 2.0 Authorization Framework @@ -61,6 +60,7 @@ #include #include "urldata.h" #include "sendf.h" +#include "if2ip.h" #include "hostip.h" #include "progress.h" #include "transfer.h" @@ -433,9 +433,6 @@ static void state(struct connectdata *conn, imapstate newstate) "AUTHENTICATE_DIGESTMD5_RESP", "AUTHENTICATE_NTLM", "AUTHENTICATE_NTLM_TYPE2MSG", - "AUTHENTICATE_GSSAPI", - "AUTHENTICATE_GSSAPI_TOKEN", - "AUTHENTICATE_GSSAPI_NO_DATA", "AUTHENTICATE_XOAUTH2", "AUTHENTICATE_CANCEL", "AUTHENTICATE_FINAL", @@ -633,6 +630,8 @@ static CURLcode imap_perform_authentication(struct connectdata *conn) if(mech && (imapc->preftype & IMAP_TYPE_SASL)) { /* Perform SASL based authentication */ result = imap_perform_authenticate(conn, mech, initresp, state1, state2); + + Curl_safefree(initresp); } else if((!imapc->login_disabled) && (imapc->preftype & IMAP_TYPE_CLEARTEXT)) @@ -645,8 +644,6 @@ static CURLcode imap_perform_authentication(struct connectdata *conn) } } - Curl_safefree(initresp); - return result; } @@ -1299,158 +1296,6 @@ static CURLcode imap_state_auth_ntlm_type2msg_resp(struct connectdata *conn, } #endif -#if defined(USE_KERBEROS5) -/* For AUTHENTICATE GSSAPI (without initial response) responses */ -static CURLcode imap_state_auth_gssapi_resp(struct connectdata *conn, - int imapcode, - imapstate instate) -{ - CURLcode result = CURLE_OK; - struct SessionHandle *data = conn->data; - struct imap_conn *imapc = &conn->proto.imapc; - size_t len = 0; - char *respmsg = NULL; - - (void)instate; /* no use for this yet */ - - if(imapcode != '+') { - failf(data, "Access denied: %d", imapcode); - result = CURLE_LOGIN_DENIED; - } - else { - /* Create the initial response message */ - result = Curl_sasl_create_gssapi_user_message(data, conn->user, - conn->passwd, "imap", - imapc->mutual_auth, - NULL, &conn->krb5, - &respmsg, &len); - if(!result && respmsg) { - /* Send the message */ - result = Curl_pp_sendf(&imapc->pp, "%s", respmsg); - - if(!result) - state(conn, IMAP_AUTHENTICATE_GSSAPI_TOKEN); - } - } - - Curl_safefree(respmsg); - - return result; -} - -/* For AUTHENTICATE GSSAPI user token responses */ -static CURLcode imap_state_auth_gssapi_token_resp(struct connectdata *conn, - int imapcode, - imapstate instate) -{ - CURLcode result = CURLE_OK; - struct SessionHandle *data = conn->data; - struct imap_conn *imapc = &conn->proto.imapc; - char *chlgmsg = NULL; - char *respmsg = NULL; - size_t len = 0; - - (void)instate; /* no use for this yet */ - - if(imapcode != '+') { - failf(data, "Access denied: %d", imapcode); - result = CURLE_LOGIN_DENIED; - } - else { - /* Get the challenge message */ - imap_get_message(data->state.buffer, &chlgmsg); - - if(imapc->mutual_auth) - /* Decode the user token challenge and create the optional response - message */ - result = Curl_sasl_create_gssapi_user_message(data, NULL, NULL, NULL, - imapc->mutual_auth, - chlgmsg, &conn->krb5, - &respmsg, &len); - else - /* Decode the security challenge and create the response message */ - result = Curl_sasl_create_gssapi_security_message(data, chlgmsg, - &conn->krb5, - &respmsg, &len); - - if(result) { - if(result == CURLE_BAD_CONTENT_ENCODING) { - /* Send the cancellation */ - result = Curl_pp_sendf(&imapc->pp, "%s", "*"); - - if(!result) - state(conn, IMAP_AUTHENTICATE_CANCEL); - } - } - else { - /* Send the response */ - if(respmsg) - result = Curl_pp_sendf(&imapc->pp, "%s", respmsg); - else - result = Curl_pp_sendf(&imapc->pp, "%s", ""); - - if(!result) - state(conn, (imapc->mutual_auth ? IMAP_AUTHENTICATE_GSSAPI_NO_DATA : - IMAP_AUTHENTICATE_FINAL)); - } - } - - Curl_safefree(respmsg); - - return result; -} - -/* For AUTHENTICATE GSSAPI no data responses */ -static CURLcode imap_state_auth_gssapi_no_data_resp(struct connectdata *conn, - int imapcode, - imapstate instate) -{ - CURLcode result = CURLE_OK; - struct SessionHandle *data = conn->data; - char *chlgmsg = NULL; - char *respmsg = NULL; - size_t len = 0; - - (void)instate; /* no use for this yet */ - - if(imapcode != '+') { - failf(data, "Access denied: %d", imapcode); - result = CURLE_LOGIN_DENIED; - } - else { - /* Get the challenge message */ - imap_get_message(data->state.buffer, &chlgmsg); - - /* Decode the security challenge and create the response message */ - result = Curl_sasl_create_gssapi_security_message(data, chlgmsg, - &conn->krb5, - &respmsg, &len); - if(result) { - if(result == CURLE_BAD_CONTENT_ENCODING) { - /* Send the cancellation */ - result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", "*"); - - if(!result) - state(conn, IMAP_AUTHENTICATE_CANCEL); - } - } - else { - /* Send the response */ - if(respmsg) { - result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", respmsg); - - if(!result) - state(conn, IMAP_AUTHENTICATE_FINAL); - } - } - } - - Curl_safefree(respmsg); - - return result; -} -#endif - /* For AUTHENTICATE XOAUTH2 (without initial response) responses */ static CURLcode imap_state_auth_xoauth2_resp(struct connectdata *conn, int imapcode, @@ -1661,7 +1506,7 @@ static CURLcode imap_state_fetch_resp(struct connectdata *conn, int imapcode, (void)instate; /* no use for this yet */ if(imapcode != '*') { - Curl_pgrsSetDownloadSize(data, -1); + Curl_pgrsSetDownloadSize(data, 0); state(conn, IMAP_STOP); return CURLE_REMOTE_FILE_NOT_FOUND; /* TODO: Fix error code */ } @@ -1910,21 +1755,6 @@ static CURLcode imap_statemach_act(struct connectdata *conn) break; #endif -#if defined(USE_KERBEROS5) - case IMAP_AUTHENTICATE_GSSAPI: - result = imap_state_auth_gssapi_resp(conn, imapcode, imapc->state); - break; - - case IMAP_AUTHENTICATE_GSSAPI_TOKEN: - result = imap_state_auth_gssapi_token_resp(conn, imapcode, imapc->state); - break; - - case IMAP_AUTHENTICATE_GSSAPI_NO_DATA: - result = imap_state_auth_gssapi_no_data_resp(conn, imapcode, - imapc->state); - break; -#endif - case IMAP_AUTHENTICATE_XOAUTH2: result = imap_state_auth_xoauth2_resp(conn, imapcode, imapc->state); break; @@ -2335,8 +2165,8 @@ static CURLcode imap_regular_transfer(struct connectdata *conn, /* Set the progress data */ Curl_pgrsSetUploadCounter(data, 0); Curl_pgrsSetDownloadCounter(data, 0); - Curl_pgrsSetUploadSize(data, -1); - Curl_pgrsSetDownloadSize(data, -1); + Curl_pgrsSetUploadSize(data, 0); + Curl_pgrsSetDownloadSize(data, 0); /* Carry out the perform */ result = imap_perform(conn, &connected, dophase_done); @@ -2447,7 +2277,7 @@ static char *imap_atom(const char *str) if(!str) return NULL; - /* Count any unescaped characters */ + /* Count any unescapped characters */ p1 = str; while(*p1) { if(*p1 == '\\') @@ -2460,7 +2290,7 @@ static char *imap_atom(const char *str) p1++; } - /* Does the input contain any unescaped characters? */ + /* Does the input contain any unescapped characters? */ if(!backsp_count && !quote_count && !space_exists) return strdup(str); @@ -2802,25 +2632,6 @@ static CURLcode imap_calc_sasl_details(struct connectdata *conn, /* Calculate the supported authentication mechanism, by decreasing order of security, as well as the initial response where appropriate */ -#if defined(USE_KERBEROS5) - if((imapc->authmechs & SASL_MECH_GSSAPI) && - (imapc->prefmech & SASL_MECH_GSSAPI)) { - imapc->mutual_auth = FALSE; /* TODO: Calculate mutual authentication */ - - *mech = SASL_MECH_STRING_GSSAPI; - *state1 = IMAP_AUTHENTICATE_GSSAPI; - *state2 = IMAP_AUTHENTICATE_GSSAPI_TOKEN; - imapc->authused = SASL_MECH_GSSAPI; - - if(imapc->ir_supported || data->set.sasl_ir) - result = Curl_sasl_create_gssapi_user_message(data, conn->user, - conn->passwd, "imap", - imapc->mutual_auth, - NULL, &conn->krb5, - initresp, len); - } - else -#endif #ifndef CURL_DISABLE_CRYPTO_AUTH if((imapc->authmechs & SASL_MECH_DIGEST_MD5) && (imapc->prefmech & SASL_MECH_DIGEST_MD5)) { diff --git a/lib/imap.h b/lib/imap.h index 768fc4b..3abe3e4 100644 --- a/lib/imap.h +++ b/lib/imap.h @@ -43,9 +43,6 @@ typedef enum { IMAP_AUTHENTICATE_DIGESTMD5_RESP, IMAP_AUTHENTICATE_NTLM, IMAP_AUTHENTICATE_NTLM_TYPE2MSG, - IMAP_AUTHENTICATE_GSSAPI, - IMAP_AUTHENTICATE_GSSAPI_TOKEN, - IMAP_AUTHENTICATE_GSSAPI_NO_DATA, IMAP_AUTHENTICATE_XOAUTH2, IMAP_AUTHENTICATE_CANCEL, IMAP_AUTHENTICATE_FINAL, @@ -92,7 +89,6 @@ struct imap_conn { bool tls_supported; /* StartTLS capability supported by server */ bool login_disabled; /* LOGIN command disabled by server */ bool ir_supported; /* Initial response supported by server */ - bool mutual_auth; /* Mutual authentication enabled (GSSAPI only) */ char *mailbox; /* The last selected mailbox */ char *mailbox_uidvalidity; /* UIDVALIDITY parsed from select response */ }; diff --git a/lib/krb5.c b/lib/krb5.c index f0cb3f1..1643f11 100644 --- a/lib/krb5.c +++ b/lib/krb5.c @@ -2,7 +2,7 @@ * * Copyright (c) 1995, 1996, 1997, 1998, 1999, 2013 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). - * Copyright (c) 2004 - 2015 Daniel Stenberg + * Copyright (c) 2004 - 2012 Daniel Stenberg * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,7 +34,13 @@ #include "curl_setup.h" -#if defined(HAVE_GSSAPI) && !defined(CURL_DISABLE_FTP) +#ifndef CURL_DISABLE_FTP +#ifdef HAVE_GSSAPI + +#ifdef HAVE_OLD_GSSMIT +#define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name +#define NCOMPAT 1 +#endif #ifdef HAVE_NETDB_H #include @@ -115,7 +121,8 @@ krb5_overhead(void *app_data, int level, int len) } static int -krb5_encode(void *app_data, const void *from, int length, int level, void **to) +krb5_encode(void *app_data, const void *from, int length, int level, void **to, + struct connectdata *conn UNUSED_PARAM) { gss_ctx_id_t *context = app_data; gss_buffer_desc dec, enc; @@ -123,6 +130,9 @@ krb5_encode(void *app_data, const void *from, int length, int level, void **to) int state; int len; + /* shut gcc up */ + conn = NULL; + /* NOTE that the cast is safe, neither of the krb5, gnu gss and heimdal * libraries modify the input buffer in gss_seal() */ @@ -226,11 +236,9 @@ krb5_auth(void *app_data, struct connectdata *conn) &min, context, gssname, - &Curl_krb5_mech_oid, &chan, gssresp, &output_buffer, - TRUE, NULL); if(gssresp) { @@ -329,4 +337,5 @@ struct Curl_sec_client_mech Curl_krb5_client_mech = { krb5_decode }; -#endif /* HAVE_GSSAPI && !CURL_DISABLE_FTP */ +#endif /* HAVE_GSSAPI */ +#endif /* CURL_DISABLE_FTP */ diff --git a/lib/ldap.c b/lib/ldap.c index f27fa90..ae48448 100644 --- a/lib/ldap.c +++ b/lib/ldap.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * 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 @@ -64,7 +64,6 @@ #include "strtok.h" #include "curl_ldap.h" #include "curl_memory.h" -#include "curl_multibyte.h" #include "curl_base64.h" #include "rawstr.h" #include "connect.h" @@ -81,19 +80,10 @@ typedef struct { char *lud_host; int lud_port; -#if defined(CURL_LDAP_WIN) - TCHAR *lud_dn; - TCHAR **lud_attrs; -#else char *lud_dn; char **lud_attrs; -#endif int lud_scope; -#if defined(CURL_LDAP_WIN) - TCHAR *lud_filter; -#else char *lud_filter; -#endif char **lud_exts; size_t lud_attrs_dups; /* how many were dup'ed, this field is not in the "real" struct so can only be used in code @@ -178,11 +168,11 @@ const struct Curl_handler Curl_handler_ldaps = { static CURLcode Curl_ldap(struct connectdata *conn, bool *done) { - CURLcode result = CURLE_OK; + CURLcode status = CURLE_OK; int rc = 0; LDAP *server = NULL; LDAPURLDesc *ludp = NULL; - LDAPMessage *ldapmsg = NULL; + LDAPMessage *result = NULL; LDAPMessage *entryIterator; int num = 0; struct SessionHandle *data=conn->data; @@ -194,15 +184,6 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done) #ifdef LDAP_OPT_NETWORK_TIMEOUT struct timeval ldap_timeout = {10,0}; /* 10 sec connection/search timeout */ #endif -#if defined(CURL_LDAP_WIN) - TCHAR *host = NULL; - TCHAR *user = NULL; - TCHAR *passwd = NULL; -#else - char *host = NULL; - char *user = NULL; - char *passwd = NULL; -#endif *done = TRUE; /* unconditionally */ infof(data, "LDAP local: LDAP Vendor = %s ; LDAP Version = %d\n", @@ -216,7 +197,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done) #endif if(rc != 0) { failf(data, "LDAP local: %s", ldap_err2string(rc)); - result = CURLE_LDAP_INVALID_URL; + status = CURLE_LDAP_INVALID_URL; goto quit; } @@ -226,32 +207,6 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done) infof(data, "LDAP local: trying to establish %s connection\n", ldap_ssl ? "encrypted" : "cleartext"); -#if defined(CURL_LDAP_WIN) - host = Curl_convert_UTF8_to_tchar(conn->host.name); - if(!host) { - result = CURLE_OUT_OF_MEMORY; - - 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; - - 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); #endif @@ -261,7 +216,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done) #ifdef HAVE_LDAP_SSL #ifdef CURL_LDAP_WIN /* Win32 LDAP SDK doesn't support insecure mode without CA! */ - server = ldap_sslinit(host, (int)conn->port, 1); + server = ldap_sslinit(conn->host.name, (int)conn->port, 1); ldap_set_option(server, LDAP_OPT_SSL, LDAP_OPT_ON); #else int ldap_option; @@ -270,7 +225,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done) rc = ldapssl_client_init(NULL, NULL); if(rc != LDAP_SUCCESS) { failf(data, "LDAP local: ldapssl_client_init %s", ldap_err2string(rc)); - result = CURLE_SSL_CERTPROBLEM; + status = CURLE_SSL_CERTPROBLEM; goto quit; } if(data->set.ssl.verifypeer) { @@ -282,7 +237,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done) if(!ldap_ca) { failf(data, "LDAP local: ERROR %s CA cert not set!", (cert_type == LDAPSSL_CERT_FILETYPE_DER ? "DER" : "PEM")); - result = CURLE_SSL_CERTPROBLEM; + status = CURLE_SSL_CERTPROBLEM; goto quit; } infof(data, "LDAP local: using %s CA cert '%s'\n", @@ -293,7 +248,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done) failf(data, "LDAP local: ERROR setting %s CA cert: %s", (cert_type == LDAPSSL_CERT_FILETYPE_DER ? "DER" : "PEM"), ldap_err2string(rc)); - result = CURLE_SSL_CERTPROBLEM; + status = CURLE_SSL_CERTPROBLEM; goto quit; } ldap_option = LDAPSSL_VERIFY_SERVER; @@ -304,14 +259,14 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done) if(rc != LDAP_SUCCESS) { failf(data, "LDAP local: ERROR setting cert verify mode: %s", ldap_err2string(rc)); - result = CURLE_SSL_CERTPROBLEM; + status = CURLE_SSL_CERTPROBLEM; goto quit; } - server = ldapssl_init(host, (int)conn->port, 1); + server = ldapssl_init(conn->host.name, (int)conn->port, 1); if(server == NULL) { failf(data, "LDAP local: Cannot connect to %s:%ld", - conn->host.dispname, conn->port); - result = CURLE_COULDNT_CONNECT; + conn->host.name, conn->port); + status = CURLE_COULDNT_CONNECT; goto quit; } #elif defined(LDAP_OPT_X_TLS) @@ -320,12 +275,12 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done) if((data->set.str[STRING_CERT_TYPE]) && (!Curl_raw_equal(data->set.str[STRING_CERT_TYPE], "PEM"))) { failf(data, "LDAP local: ERROR OpenLDAP only supports PEM cert-type!"); - result = CURLE_SSL_CERTPROBLEM; + status = CURLE_SSL_CERTPROBLEM; goto quit; } if(!ldap_ca) { failf(data, "LDAP local: ERROR PEM CA cert not set!"); - result = CURLE_SSL_CERTPROBLEM; + status = CURLE_SSL_CERTPROBLEM; goto quit; } infof(data, "LDAP local: using PEM CA cert: %s\n", ldap_ca); @@ -333,7 +288,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done) if(rc != LDAP_SUCCESS) { failf(data, "LDAP local: ERROR setting PEM CA cert: %s", ldap_err2string(rc)); - result = CURLE_SSL_CERTPROBLEM; + status = CURLE_SSL_CERTPROBLEM; goto quit; } ldap_option = LDAP_OPT_X_TLS_DEMAND; @@ -345,14 +300,14 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done) if(rc != LDAP_SUCCESS) { failf(data, "LDAP local: ERROR setting cert verify mode: %s", ldap_err2string(rc)); - result = CURLE_SSL_CERTPROBLEM; + status = CURLE_SSL_CERTPROBLEM; goto quit; } - server = ldap_init(host, (int)conn->port); + server = ldap_init(conn->host.name, (int)conn->port); if(server == NULL) { failf(data, "LDAP local: Cannot connect to %s:%ld", - conn->host.dispname, conn->port); - result = CURLE_COULDNT_CONNECT; + conn->host.name, conn->port); + status = CURLE_COULDNT_CONNECT; goto quit; } ldap_option = LDAP_OPT_X_TLS_HARD; @@ -360,7 +315,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done) if(rc != LDAP_SUCCESS) { failf(data, "LDAP local: ERROR setting SSL/TLS mode: %s", ldap_err2string(rc)); - result = CURLE_SSL_CERTPROBLEM; + status = CURLE_SSL_CERTPROBLEM; goto quit; } /* @@ -368,7 +323,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done) if(rc != LDAP_SUCCESS) { failf(data, "LDAP local: ERROR starting SSL/TLS mode: %s", ldap_err2string(rc)); - result = CURLE_SSL_CERTPROBLEM; + status = CURLE_SSL_CERTPROBLEM; goto quit; } */ @@ -377,18 +332,18 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done) should check in first place if we can support LDAP SSL/TLS */ failf(data, "LDAP local: SSL/TLS not supported with this version " "of the OpenLDAP toolkit\n"); - result = CURLE_SSL_CERTPROBLEM; + status = CURLE_SSL_CERTPROBLEM; goto quit; #endif #endif #endif /* CURL_LDAP_USE_SSL */ } else { - server = ldap_init(host, (int)conn->port); + server = ldap_init(conn->host.name, (int)conn->port); if(server == NULL) { failf(data, "LDAP local: Cannot connect to %s:%ld", - conn->host.dispname, conn->port); - result = CURLE_COULDNT_CONNECT; + conn->host.name, conn->port); + status = CURLE_COULDNT_CONNECT; goto quit; } } @@ -396,259 +351,107 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done) ldap_set_option(server, LDAP_OPT_PROTOCOL_VERSION, &ldap_proto); #endif - rc = ldap_simple_bind_s(server, user, passwd); + rc = ldap_simple_bind_s(server, + conn->bits.user_passwd ? conn->user : NULL, + conn->bits.user_passwd ? conn->passwd : NULL); if(!ldap_ssl && rc != 0) { ldap_proto = LDAP_VERSION2; ldap_set_option(server, LDAP_OPT_PROTOCOL_VERSION, &ldap_proto); - rc = ldap_simple_bind_s(server, user, passwd); + rc = ldap_simple_bind_s(server, + conn->bits.user_passwd ? conn->user : NULL, + conn->bits.user_passwd ? conn->passwd : NULL); } if(rc != 0) { failf(data, "LDAP local: ldap_simple_bind_s %s", ldap_err2string(rc)); - result = CURLE_LDAP_CANNOT_BIND; + status = CURLE_LDAP_CANNOT_BIND; goto quit; } rc = ldap_search_s(server, ludp->lud_dn, ludp->lud_scope, - ludp->lud_filter, ludp->lud_attrs, 0, &ldapmsg); + ludp->lud_filter, ludp->lud_attrs, 0, &result); if(rc != 0 && rc != LDAP_SIZELIMIT_EXCEEDED) { failf(data, "LDAP remote: %s", ldap_err2string(rc)); - result = CURLE_LDAP_SEARCH_FAILED; + status = CURLE_LDAP_SEARCH_FAILED; goto quit; } - for(num = 0, entryIterator = ldap_first_entry(server, ldapmsg); + for(num = 0, entryIterator = ldap_first_entry(server, result); entryIterator; entryIterator = ldap_next_entry(server, entryIterator), num++) { BerElement *ber = NULL; -#if defined(CURL_LDAP_WIN) - TCHAR *attribute; -#else char *attribute; /*! suspicious that this isn't 'const' */ -#endif + char *dn = ldap_get_dn(server, entryIterator); int i; - /* Get the DN and write it to the client */ - { - char *name; - size_t name_len; -#if defined(CURL_LDAP_WIN) - TCHAR *dn = ldap_get_dn(server, entryIterator); - name = Curl_convert_tchar_to_UTF8(dn); - if(!name) { - ldap_memfree(dn); - - result = CURLE_OUT_OF_MEMORY; - - goto quit; - } -#else - char *dn = name = ldap_get_dn(server, entryIterator); -#endif - name_len = strlen(name); - - result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"DN: ", 4); - if(result) { -#if defined(CURL_LDAP_WIN) - Curl_unicodefree(name); -#endif - ldap_memfree(dn); + Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"DN: ", 4); + Curl_client_write(conn, CLIENTWRITE_BODY, (char *)dn, 0); + Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 1); - goto quit; - } - - result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *) name, - name_len); - if(result) { -#if defined(CURL_LDAP_WIN) - Curl_unicodefree(name); -#endif - ldap_memfree(dn); + dlsize += strlen(dn)+5; - goto quit; - } - - result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 1); - if(result) { -#if defined(CURL_LDAP_WIN) - Curl_unicodefree(name); -#endif - ldap_memfree(dn); - - goto quit; - } - - dlsize += name_len + 5; - -#if defined(CURL_LDAP_WIN) - Curl_unicodefree(name); -#endif - ldap_memfree(dn); - } - - /* Get the attributes and write them to the client */ for(attribute = ldap_first_attribute(server, entryIterator, &ber); attribute; attribute = ldap_next_attribute(server, entryIterator, ber)) { - BerValue **vals; - size_t attr_len; -#if defined(CURL_LDAP_WIN) - char *attr = Curl_convert_tchar_to_UTF8(attribute); - if(!attr) { - if(ber) - ber_free(ber, 0); - - result = CURLE_OUT_OF_MEMORY; + BerValue **vals = ldap_get_values_len(server, entryIterator, attribute); - goto quit; - } -#else - char *attr = attribute; -#endif - attr_len = strlen(attr); - - vals = ldap_get_values_len(server, entryIterator, attribute); if(vals != NULL) { for(i = 0; (vals[i] != NULL); i++) { - result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\t", 1); - if(result) { - ldap_value_free_len(vals); -#if defined(CURL_LDAP_WIN) - Curl_unicodefree(attr); -#endif - ldap_memfree(attribute); - if(ber) - ber_free(ber, 0); - - goto quit; - } - - result = Curl_client_write(conn, CLIENTWRITE_BODY, - (char *) attr, attr_len); - if(result) { - ldap_value_free_len(vals); -#if defined(CURL_LDAP_WIN) - Curl_unicodefree(attr); -#endif - ldap_memfree(attribute); - if(ber) - ber_free(ber, 0); - - goto quit; - } - - result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)": ", 2); - if(result) { - ldap_value_free_len(vals); -#if defined(CURL_LDAP_WIN) - Curl_unicodefree(attr); -#endif - ldap_memfree(attribute); - if(ber) - ber_free(ber, 0); - - goto quit; - } - - dlsize += attr_len + 3; - - if((attr_len > 7) && - (strcmp(";binary", (char *) attr + (attr_len - 7)) == 0)) { + Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\t", 1); + Curl_client_write(conn, CLIENTWRITE_BODY, (char *) attribute, 0); + Curl_client_write(conn, CLIENTWRITE_BODY, (char *)": ", 2); + dlsize += strlen(attribute)+3; + + if((strlen(attribute) > 7) && + (strcmp(";binary", + (char *)attribute + + (strlen((char *)attribute) - 7)) == 0)) { /* Binary attribute, encode to base64. */ - result = Curl_base64_encode(data, - vals[i]->bv_val, - vals[i]->bv_len, - &val_b64, - &val_b64_sz); - if(result) { + CURLcode error = Curl_base64_encode(data, + vals[i]->bv_val, + vals[i]->bv_len, + &val_b64, + &val_b64_sz); + if(error) { ldap_value_free_len(vals); -#if defined(CURL_LDAP_WIN) - Curl_unicodefree(attr); -#endif ldap_memfree(attribute); + ldap_memfree(dn); if(ber) ber_free(ber, 0); - + status = error; goto quit; } - if(val_b64_sz > 0) { - result = Curl_client_write(conn, CLIENTWRITE_BODY, val_b64, - val_b64_sz); + Curl_client_write(conn, CLIENTWRITE_BODY, val_b64, val_b64_sz); free(val_b64); - if(result) { - ldap_value_free_len(vals); -#if defined(CURL_LDAP_WIN) - Curl_unicodefree(attr); -#endif - ldap_memfree(attribute); - if(ber) - ber_free(ber, 0); - - goto quit; - } - dlsize += val_b64_sz; } } else { - result = Curl_client_write(conn, CLIENTWRITE_BODY, vals[i]->bv_val, - vals[i]->bv_len); - if(result) { - ldap_value_free_len(vals); -#if defined(CURL_LDAP_WIN) - Curl_unicodefree(attr); -#endif - ldap_memfree(attribute); - if(ber) - ber_free(ber, 0); - - goto quit; - } - + Curl_client_write(conn, CLIENTWRITE_BODY, vals[i]->bv_val, + vals[i]->bv_len); dlsize += vals[i]->bv_len; } - - result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 1); - if(result) { - ldap_value_free_len(vals); -#if defined(CURL_LDAP_WIN) - Curl_unicodefree(attr); -#endif - ldap_memfree(attribute); - if(ber) - ber_free(ber, 0); - - goto quit; - } - + Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 0); dlsize++; } /* Free memory used to store values */ ldap_value_free_len(vals); } - - /* Free the attribute as we are done with it */ -#if defined(CURL_LDAP_WIN) - Curl_unicodefree(attr); -#endif - ldap_memfree(attribute); - - result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 1); - if(result) - goto quit; + Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 1); dlsize++; Curl_pgrsSetDownloadCounter(data, dlsize); + ldap_memfree(attribute); } - + ldap_memfree(dn); if(ber) ber_free(ber, 0); } quit: - if(ldapmsg) { - ldap_msgfree(ldapmsg); + if(result) { + ldap_msgfree(result); LDAP_TRACE (("Received %d entries\n", num)); } if(rc == LDAP_SIZELIMIT_EXCEEDED) @@ -662,17 +465,11 @@ quit: ldapssl_client_deinit(); #endif /* HAVE_LDAP_SSL && CURL_HAS_NOVELL_LDAPSDK */ -#if defined(CURL_LDAP_WIN) - Curl_unicodefree(passwd); - Curl_unicodefree(user); - Curl_unicodefree(host); -#endif - /* no data to transfer */ Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL); connclose(conn, "LDAP connection always disable re-use"); - return result; + return status; } #ifdef DEBUG_LDAP @@ -716,34 +513,57 @@ static int str2scope (const char *p) /* * Split 'str' into strings separated by commas. - * Note: out[] points into 'str'. + * Note: res[] points into 'str'. */ -static bool split_str(char *str, char ***out, size_t *count) +static char **split_str (char *str) { - char **res; - char *lasts; - char *s; - size_t i; - size_t items = 1; - - s = strchr(str, ','); - while(s) { - items++; - s = strchr(++s, ','); - } + char **res, *lasts, *s; + int i; - res = calloc(items, sizeof(char *)); + for(i = 2, s = strchr(str,','); s; i++) + s = strchr(++s,','); + + res = calloc(i, sizeof(char*)); if(!res) - return FALSE; + return NULL; - for(i = 0, s = strtok_r(str, ",", &lasts); s && i < items; + for(i = 0, s = strtok_r(str, ",", &lasts); s; s = strtok_r(NULL, ",", &lasts), i++) res[i] = s; + return res; +} + +/* + * Unescape the LDAP-URL components + */ +static bool unescape_elements (void *data, LDAPURLDesc *ludp) +{ + int i; - *out = res; - *count = items; + if(ludp->lud_filter) { + ludp->lud_filter = curl_easy_unescape(data, ludp->lud_filter, 0, NULL); + if(!ludp->lud_filter) + return FALSE; + } + + for(i = 0; ludp->lud_attrs && ludp->lud_attrs[i]; i++) { + ludp->lud_attrs[i] = curl_easy_unescape(data, ludp->lud_attrs[i], + 0, NULL); + if(!ludp->lud_attrs[i]) + return FALSE; + ludp->lud_attrs_dups++; + } - return TRUE; + if(ludp->lud_dn) { + char *dn = ludp->lud_dn; + char *new_dn = curl_easy_unescape(data, dn, 0, NULL); + + free(dn); + ludp->lud_dn = new_dn; + if(!new_dn) + return (FALSE); + } + return (TRUE); } /* @@ -762,11 +582,8 @@ static bool split_str(char *str, char ***out, size_t *count) */ static int _ldap_url_parse2 (const struct connectdata *conn, LDAPURLDesc *ludp) { - int rc = LDAP_SUCCESS; - char *path; - char *p; - char *q; - size_t i; + char *p, *q; + int i; if(!conn->data || !conn->data->state.path || @@ -778,190 +595,74 @@ static int _ldap_url_parse2 (const struct connectdata *conn, LDAPURLDesc *ludp) ludp->lud_port = conn->remote_port; ludp->lud_host = conn->host.name; - /* Duplicate the path */ - p = path = strdup(conn->data->state.path + 1); - if(!path) + /* parse DN (Distinguished Name). + */ + ludp->lud_dn = strdup(conn->data->state.path+1); + if(!ludp->lud_dn) return LDAP_NO_MEMORY; - /* Parse the DN (Distinguished Name) */ - q = strchr(p, '?'); - if(q) - *q++ = '\0'; - - if(*p) { - char *dn = p; - char *unescaped; - - LDAP_TRACE (("DN '%s'\n", dn)); - - /* Unescape the DN */ - unescaped = curl_easy_unescape(conn->data, dn, 0, NULL); - if(!unescaped) { - rc = LDAP_NO_MEMORY; - - goto quit; - } - -#if defined(CURL_LDAP_WIN) - /* Convert the unescaped string to a tchar */ - ludp->lud_dn = Curl_convert_UTF8_to_tchar(unescaped); - - /* Free the unescaped string as we are done with it */ - Curl_unicodefree(unescaped); - - if(!ludp->lud_dn) { - rc = LDAP_NO_MEMORY; - - goto quit; - } -#else - ludp->lud_dn = unescaped; -#endif - } + p = strchr(ludp->lud_dn, '?'); + LDAP_TRACE (("DN '%.*s'\n", p ? (size_t)(p-ludp->lud_dn) : + strlen(ludp->lud_dn), ludp->lud_dn)); - p = q; if(!p) - goto quit; + goto success; - /* Parse the attributes. skip "??" */ + *p++ = '\0'; + + /* parse attributes. skip "??". + */ q = strchr(p, '?'); if(q) *q++ = '\0'; - if(*p) { - char **attributes; - size_t count = 0; - - /* Split the string into an array of attributes */ - if(!split_str(p, &attributes, &count)) { - rc = LDAP_NO_MEMORY; - - goto quit; - } + if(*p && *p != '?') { + ludp->lud_attrs = split_str(p); + if(!ludp->lud_attrs) + return LDAP_NO_MEMORY; - /* Allocate our array (+1 for the NULL entry) */ -#if defined(CURL_LDAP_WIN) - ludp->lud_attrs = calloc(count + 1, sizeof(TCHAR *)); -#else - ludp->lud_attrs = calloc(count + 1, sizeof(char *)); -#endif - if(!ludp->lud_attrs) { - Curl_safefree(attributes); - - rc = LDAP_NO_MEMORY; - - goto quit; - } - - for(i = 0; i < count; i++) { - char *unescaped; - - LDAP_TRACE (("attr[%d] '%s'\n", i, attributes[i])); - - /* Unescape the attribute */ - unescaped = curl_easy_unescape(conn->data, attributes[i], 0, NULL); - if(!unescaped) { - Curl_safefree(attributes); - - rc = LDAP_NO_MEMORY; - - goto quit; - } - -#if defined(CURL_LDAP_WIN) - /* Convert the unescaped string to a tchar */ - ludp->lud_attrs[i] = Curl_convert_UTF8_to_tchar(unescaped); - - /* Free the unescaped string as we are done with it */ - Curl_unicodefree(unescaped); - - if(!ludp->lud_attrs[i]) { - Curl_safefree(attributes); - - rc = LDAP_NO_MEMORY; - - goto quit; - } -#else - ludp->lud_attrs[i] = unescaped; -#endif - - ludp->lud_attrs_dups++; - } - - Curl_safefree(attributes); + for(i = 0; ludp->lud_attrs[i]; i++) + LDAP_TRACE (("attr[%d] '%s'\n", i, ludp->lud_attrs[i])); } p = q; if(!p) - goto quit; + goto success; - /* Parse the scope. skip "??" */ + /* parse scope. skip "??" + */ q = strchr(p, '?'); if(q) *q++ = '\0'; - if(*p) { + if(*p && *p != '?') { ludp->lud_scope = str2scope(p); if(ludp->lud_scope == -1) { - rc = LDAP_INVALID_SYNTAX; - - goto quit; + return LDAP_INVALID_SYNTAX; } LDAP_TRACE (("scope %d\n", ludp->lud_scope)); } p = q; if(!p) - goto quit; + goto success; - /* Parse the filter */ + /* parse filter + */ q = strchr(p, '?'); if(q) *q++ = '\0'; - - if(*p) { - char *filter = p; - char *unescaped; - - LDAP_TRACE (("filter '%s'\n", filter)); - - /* Unescape the filter */ - unescaped = curl_easy_unescape(conn->data, filter, 0, NULL); - if(!unescaped) { - rc = LDAP_NO_MEMORY; - - goto quit; - } - -#if defined(CURL_LDAP_WIN) - /* Convert the unescaped string to a tchar */ - ludp->lud_filter = Curl_convert_UTF8_to_tchar(unescaped); - - /* Free the unescaped string as we are done with it */ - Curl_unicodefree(unescaped); - - if(!ludp->lud_filter) { - rc = LDAP_NO_MEMORY; - - goto quit; - } -#else - ludp->lud_filter = unescaped; -#endif - } - - p = q; - if(p && !*p) { - rc = LDAP_INVALID_SYNTAX; - - goto quit; + if(!*p) { + return LDAP_INVALID_SYNTAX; } -quit: - Curl_safefree(path); + ludp->lud_filter = p; + LDAP_TRACE (("filter '%s'\n", ludp->lud_filter)); - return rc; + success: + if(!unescape_elements(conn->data, ludp)) + return LDAP_NO_MEMORY; + return LDAP_SUCCESS; } static int _ldap_url_parse (const struct connectdata *conn, diff --git a/lib/md4.c b/lib/md4.c index fd0c6d4..6930e02 100644 --- a/lib/md4.c +++ b/lib/md4.c @@ -22,9 +22,9 @@ #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) +/* NSS crypto library does not provide the MD4 hash algorithm, so that we have + * a local implementation of it */ +#ifdef USE_NSS #include "curl_md4.h" #include "warnless.h" @@ -279,4 +279,4 @@ void Curl_md4it(unsigned char *output, const unsigned char *input, size_t len) MD4Update(&ctx, input, curlx_uztoui(len)); MD4Final(output, &ctx); } -#endif /* defined(USE_NSS) || defined(USE_OS400CRYPTO) */ +#endif /* USE_NSS */ diff --git a/lib/mk-ca-bundle.pl b/lib/mk-ca-bundle.pl index 0b13318..232c36e 100755 --- a/lib/mk-ca-bundle.pl +++ b/lib/mk-ca-bundle.pl @@ -37,24 +37,20 @@ use strict; use vars qw($opt_b $opt_d $opt_f $opt_h $opt_i $opt_l $opt_n $opt_p $opt_q $opt_s $opt_t $opt_u $opt_v $opt_w); use List::Util; use Text::Wrap; -my $MOD_SHA = "Digest::SHA"; -eval "require $MOD_SHA"; -if ($@) { - $MOD_SHA = "Digest::SHA::PurePerl"; - eval "require $MOD_SHA"; -} my %urls = ( 'nss' => - 'http://hg.mozilla.org/projects/nss/raw-file/tip/lib/ckfw/builtins/certdata.txt', + 'http://mxr.mozilla.org/nss/source/lib/ckfw/builtins/certdata.txt?raw=1', 'central' => - 'http://hg.mozilla.org/mozilla-central/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt', + 'http://mxr.mozilla.org/mozilla-central/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1', 'aurora' => - 'http://hg.mozilla.org/releases/mozilla-aurora/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt', + 'http://mxr.mozilla.org/mozilla-aurora/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1', 'beta' => - 'http://hg.mozilla.org/releases/mozilla-beta/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt', + 'http://mxr.mozilla.org/mozilla-beta/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1', 'release' => - 'http://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt', + 'http://mxr.mozilla.org/mozilla-release/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1', + 'mozilla' => + 'http://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1' ); $opt_d = 'release'; @@ -62,7 +58,7 @@ $opt_d = 'release'; # If the OpenSSL commandline is not in search path you can configure it here! my $openssl = 'openssl'; -my $version = '1.25'; +my $version = '1.21'; $opt_w = 76; # default base64 encoded lines length @@ -103,8 +99,7 @@ my @valid_signature_algorithms = ( "MD5", "SHA1", "SHA256", - "SHA384", - "SHA512" + "SHA512" ); $0 =~ s@.*(/|\\)@@; @@ -119,33 +114,29 @@ if(!defined($opt_d)) { # Use predefined URL or else custom URL specified on command line. my $url = ( defined( $urls{$opt_d} ) ) ? $urls{$opt_d} : $opt_d; -my $curl = `curl -V`; - if ($opt_i) { print ("=" x 78 . "\n"); - print "Script Version : $version\n"; - print "Perl Version : $]\n"; - print "Operating System Name : $^O\n"; - print "Getopt::Std.pm Version : ${Getopt::Std::VERSION}\n"; - print "MIME::Base64.pm Version : ${MIME::Base64::VERSION}\n"; - print "LWP::UserAgent.pm Version : ${LWP::UserAgent::VERSION}\n"; - print "LWP.pm Version : ${LWP::VERSION}\n"; - print "Digest::SHA.pm Version : ${Digest::SHA::VERSION}\n" if ($Digest::SHA::VERSION); - print "Digest::SHA::PurePerl.pm Version : ${Digest::SHA::PurePerl::VERSION}\n" if ($Digest::SHA::PurePerl::VERSION); + print "Script Version : $version\n"; + print "Perl Version : $]\n"; + print "Operating System Name : $^O\n"; + print "Getopt::Std.pm Version : ${Getopt::Std::VERSION}\n"; + print "MIME::Base64.pm Version : ${MIME::Base64::VERSION}\n"; + print "LWP::UserAgent.pm Version : ${LWP::UserAgent::VERSION}\n"; + print "LWP.pm Version : ${LWP::VERSION}\n"; print ("=" x 78 . "\n"); } -sub warning_message() { +sub WARNING_MESSAGE() { if ( $opt_d =~ m/^risk$/i ) { # Long Form Warning and Exit print "Warning: Use of this script may pose some risk:\n"; - print "\n"; - print " 1) Using http is subject to man in the middle attack of certdata content\n"; - print " 2) Default to 'release', but more recent updates may be found in other trees\n"; - print " 3) certdata.txt file format may change, lag time to update this script\n"; - print " 4) Generally unwise to blindly trust CAs without manual review & verification\n"; - print " 5) Mozilla apps use additional security checks aren't represented in certdata\n"; - print " 6) Use of this script will make a security engineer grind his teeth and\n"; - print " swear at you. ;)\n"; + print "\n"; + print " 1) Using http is subject to man in the middle attack of certdata content\n"; + print " 2) Default to 'release', but more recent updates may be found in other trees\n"; + print " 3) certdata.txt file format may change, lag time to update this script\n"; + print " 4) Generally unwise to blindly trust CAs without manual review & verification\n"; + print " 5) Mozilla apps use additional security checks aren't represented in certdata\n"; + print " 6) Use of this script will make a security engineer grind his teeth and\n"; + print " swear at you. ;)\n"; exit; } else { # Short Form Warning print "Warning: Use of this script may pose some risk, -d risk for more details.\n"; @@ -182,10 +173,10 @@ sub VERSION_MESSAGE() { print "${0} version ${version} running Perl ${]} on ${^O}\n"; } -warning_message() unless ($opt_q || $url =~ m/^(ht|f)tps:/i ); +WARNING_MESSAGE() unless ($opt_q || $url =~ m/^(ht|f)tps:/i ); HELP_MESSAGE() if ($opt_h); -sub is_in_list($@) { +sub IS_IN_LIST($@) { my $target = shift; return defined(List::Util::first { $target eq $_ } @_); @@ -193,7 +184,7 @@ sub is_in_list($@) { # Parses $param_string as a case insensitive comma separated list with optional whitespace # validates that only allowed parameters are supplied -sub parse_csv_param($$@) { +sub PARSE_CSV_PARAM($$@) { my $description = shift; my $param_string = shift; my @valid_values = @_; @@ -205,67 +196,38 @@ sub parse_csv_param($$@) { } split( ',', $param_string ); # Find all values which are not in the list of valid values or "ALL" - my @invalid = grep { !is_in_list($_,"ALL",@valid_values) } @values; + my @invalid = grep { !IS_IN_LIST($_,"ALL",@valid_values) } @values; if ( scalar(@invalid) > 0 ) { # Tell the user which parameters were invalid and print the standard help message which will exit print "Error: Invalid ", $description, scalar(@invalid) == 1 ? ": " : "s: ", join( ", ", map { "\"$_\"" } @invalid ), "\n"; HELP_MESSAGE(); } - - @values = @valid_values if ( is_in_list("ALL",@values) ); - + + @values = @valid_values if ( IS_IN_LIST("ALL",@values) ); + return @values; } -sub sha1 { - my $result; - if ($Digest::SHA::VERSION || $Digest::SHA::PurePerl::VERSION) { - open(FILE, $_[0]) or die "Can't open '$_[0]': $!"; - binmode(FILE); - $result = $MOD_SHA->new(1)->addfile(*FILE)->hexdigest; - close(FILE); - } else { - # Use OpenSSL command if Perl Digest::SHA modules not available - $result = (split(/ |\r|\n/,`$openssl dgst -sha1 $_[0]`))[1]; - } - return $result; -} - - -sub oldsha1 { - my $sha1 = ""; - open(C, "<$_[0]") || return 0; - while() { - chomp; - if($_ =~ /^\#\# SHA1: (.*)/) { - $sha1 = $1; - last; - } - } - close(C); - return $sha1; -} - if ( $opt_p !~ m/:/ ) { print "Error: Mozilla trust identifier list must include both purposes and levels\n"; HELP_MESSAGE(); } (my $included_mozilla_trust_purposes_string, my $included_mozilla_trust_levels_string) = split( ':', $opt_p ); -my @included_mozilla_trust_purposes = parse_csv_param( "trust purpose", $included_mozilla_trust_purposes_string, @valid_mozilla_trust_purposes ); -my @included_mozilla_trust_levels = parse_csv_param( "trust level", $included_mozilla_trust_levels_string, @valid_mozilla_trust_levels ); +my @included_mozilla_trust_purposes = PARSE_CSV_PARAM( "trust purpose", $included_mozilla_trust_purposes_string, @valid_mozilla_trust_purposes ); +my @included_mozilla_trust_levels = PARSE_CSV_PARAM( "trust level", $included_mozilla_trust_levels_string, @valid_mozilla_trust_levels ); -my @included_signature_algorithms = parse_csv_param( "signature algorithm", $opt_s, @valid_signature_algorithms ); +my @included_signature_algorithms = PARSE_CSV_PARAM( "signature algorithm", $opt_s, @valid_signature_algorithms ); -sub should_output_cert(%) { +sub SHOULD_OUTPUT_CERT(%) { my %trust_purposes_by_level = @_; - + foreach my $level (@included_mozilla_trust_levels) { # for each level we want to output, see if any of our desired purposes are included - return 1 if ( defined( List::Util::first { is_in_list( $_, @included_mozilla_trust_purposes ) } @{$trust_purposes_by_level{$level}} ) ); + return 1 if ( defined( List::Util::first { IS_IN_LIST( $_, @included_mozilla_trust_purposes ) } @{$trust_purposes_by_level{$level}} ) ); } - + return 0; } @@ -276,26 +238,8 @@ my $stdout = $crt eq '-'; my $resp; my $fetched; -my $oldsha1 = oldsha1($crt); - -print STDERR "SHA1 of old file: $oldsha1\n" if (!$opt_q); - -print STDERR "Downloading '$txt' ...\n" if (!$opt_q); - -if($curl && !$opt_n) { - my $https = $url; - $https =~ s/^http:/https:/; - print STDERR "Get certdata over HTTPS with curl!\n" if (!$opt_q); - my $quiet = $opt_q ? "-s" : ""; - my @out = `curl -w %{response_code} $quiet -O $https`; - if(@out && $out[0] == 200) { - $fetched = 1; - } else { - print STDERR "Failed downloading HTTPS with curl, trying HTTP with LWP\n" if (!$opt_q); - } -} - -unless ($fetched || ($opt_n and -e $txt)) { +unless ($opt_n and -e $txt) { + print STDERR "Downloading '$txt' ...\n" if (!$opt_q); my $ua = new LWP::UserAgent(agent => "$0/$version"); $ua->env_proxy(); $resp = $ua->mirror($url, $txt); @@ -313,25 +257,7 @@ unless ($fetched || ($opt_n and -e $txt)) { } } -my $filedate = $resp ? $resp->last_modified : (stat($txt))[9]; -my $datesrc = "as of"; -if(!$filedate) { - # mxr.mozilla.org gave us a time, hg.mozilla.org does not! - $filedate = time(); - $datesrc="downloaded on"; -} - -# get the hash from the download file -my $newsha1= sha1($txt); - -if(!$opt_f && $oldsha1 eq $newsha1) { - print STDERR "Downloaded file identical to previous run\'s source file. Exiting\n"; - exit; -} - -print STDERR "SHA1 of new file: $newsha1\n"; - -my $currentdate = scalar gmtime($filedate); +my $currentdate = scalar gmtime($fetched ? $resp->last_modified : (stat($txt))[9]); my $format = $opt_t ? "plain text and " : ""; if( $stdout ) { @@ -341,9 +267,9 @@ if( $stdout ) { } print CRT <) { while () { last if (/^#/); if (/^CKA_TRUST_([A-Z_]+)\s+CK_TRUST\s+CKT_NSS_([A-Z_]+)\s*$/) { - if ( !is_in_list($1,@valid_mozilla_trust_purposes) ) { + if ( !IS_IN_LIST($1,@valid_mozilla_trust_purposes) ) { print STDERR "Warning: Unrecognized trust purpose for cert: $caname. Trust purpose: $1. Trust Level: $2\n" if (!$opt_q); - } elsif ( !is_in_list($2,@valid_mozilla_trust_levels) ) { + } elsif ( !IS_IN_LIST($2,@valid_mozilla_trust_levels) ) { print STDERR "Warning: Unrecognized trust level for cert: $caname. Trust purpose: $1. Trust Level: $2\n" if (!$opt_q); } else { push @{$trust_purposes_by_level{$2}}, $1; @@ -422,7 +345,7 @@ while () { } } - if ( !should_output_cert(%trust_purposes_by_level) ) { + if ( !SHOULD_OUTPUT_CERT(%trust_purposes_by_level) ) { $skipnum ++; } else { my $encoded = MIME::Base64::encode_base64($data, ''); @@ -492,3 +415,7 @@ unless( $stdout ) { } unlink $txt if ($opt_u); print STDERR "Done ($certnum CA certs processed, $skipnum skipped).\n" if (!$opt_q); + +exit; + + diff --git a/lib/mk-ca-bundle.vbs b/lib/mk-ca-bundle.vbs index 2d82e7d..d868079 100755 --- a/lib/mk-ca-bundle.vbs +++ b/lib/mk-ca-bundle.vbs @@ -5,7 +5,7 @@ '* | (__| |_| | _ <| |___ '* \___|\___/|_| \_\_____| '* -'* Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +'* Copyright (C) 1998 - 2013, Daniel Stenberg, , 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,10 @@ '* Hacked by Guenter Knauf '*************************************************************************** Option Explicit -Const myVersion = "0.3.9" +Const myVersion = "0.3.8" + +Const myUrl = "http://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1" -Const myUrl = "http://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt" Const myOpenssl = "openssl.exe" Const myCdSavF = FALSE ' Flag: save downloaded data to file certdata.txt @@ -47,7 +48,7 @@ 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) +myCdFile = Mid(myUrl, InstrRev(myUrl, "/") + 1, InstrRev(myUrl, "?") - InstrRev(myUrl, "/") - 1) myCaFile = "ca-bundle.crt" myTmpName = InputBox("Enter output filename:", mySelf, myCaFile) If Not (myTmpName = "") Then @@ -59,8 +60,8 @@ 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 +If Not (objHttp.statusText = "OK") Then + MsgBox("Failed to download '" & myCdFile & "': " & objHttp.statusText), vbCritical, mySelf WScript.Quit 1 End If ' Convert data from ResponseBody instead of using ResponseText because of UTF-8 diff --git a/lib/multi.c b/lib/multi.c index 97c9e65..ca975a0 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * 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 @@ -30,7 +30,6 @@ #include "connect.h" #include "progress.h" #include "easyif.h" -#include "share.h" #include "multiif.h" #include "sendf.h" #include "timeval.h" @@ -113,11 +112,10 @@ static void mstate(struct SessionHandle *data, CURLMstate state #endif ) { - CURLMstate oldstate = data->mstate; - -#if defined(DEBUGBUILD) && defined(CURL_DISABLE_VERBOSE_STRINGS) - (void) lineno; +#ifdef DEBUGBUILD + long connection_id = -5000; #endif + CURLMstate oldstate = data->mstate; if(oldstate == state) /* don't bother when the new state is the same as the old state */ @@ -125,11 +123,9 @@ static void mstate(struct SessionHandle *data, CURLMstate state data->mstate = state; -#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS) +#ifdef DEBUGBUILD if(data->mstate >= CURLM_STATE_CONNECT_PEND && data->mstate < CURLM_STATE_COMPLETED) { - long connection_id = -5000; - if(data->easy_conn) connection_id = data->easy_conn->connection_id; @@ -139,7 +135,6 @@ static void mstate(struct SessionHandle *data, CURLMstate state (void *)data, lineno, connection_id); } #endif - if(state == CURLM_STATE_COMPLETED) /* changing to COMPLETED means there's one less easy handle 'alive' */ data->multi->num_alive--; @@ -184,12 +179,11 @@ static struct Curl_sh_entry *sh_addentry(struct curl_hash *sh, check = calloc(1, sizeof(struct Curl_sh_entry)); if(!check) return NULL; /* major failure */ - check->easy = data; check->socket = s; /* make/add new hash entry */ - if(!Curl_hash_add(sh, (char *)&s, sizeof(curl_socket_t), check)) { + if(NULL == Curl_hash_add(sh, (char *)&s, sizeof(curl_socket_t), check)) { free(check); return NULL; /* major failure */ } @@ -314,10 +308,6 @@ struct Curl_multi *Curl_multi_handle(int hashsize, /* socket hash */ 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) @@ -343,7 +333,6 @@ struct Curl_multi *Curl_multi_handle(int hashsize, /* socket hash */ Curl_close(multi->closure_handle); multi->closure_handle = NULL; Curl_llist_destroy(multi->msglist, NULL); - Curl_llist_destroy(multi->pending, NULL); free(multi); return NULL; @@ -492,9 +481,6 @@ CURLMcode curl_multi_remove_handle(CURLM *multi_handle, struct Curl_multi *multi=(struct Curl_multi *)multi_handle; struct SessionHandle *easy = curl_handle; struct SessionHandle *data = easy; - bool premature; - bool easy_owns_conn; - struct curl_llist_element *e; /* First, make some basic checks that the CURLM handle is a good handle */ if(!GOOD_MULTI_HANDLE(multi)) @@ -508,117 +494,126 @@ CURLMcode curl_multi_remove_handle(CURLM *multi_handle, if(!data->multi) return CURLM_OK; /* it is already removed so let's say it is fine! */ + if(easy) { + bool premature = (data->mstate < CURLM_STATE_COMPLETED) ? TRUE : FALSE; + bool easy_owns_conn = (data->easy_conn && + (data->easy_conn->data == easy)) ? + TRUE : FALSE; - premature = (data->mstate < CURLM_STATE_COMPLETED) ? TRUE : FALSE; - easy_owns_conn = (data->easy_conn && (data->easy_conn->data == easy)) ? - TRUE : FALSE; + /* If the 'state' is not INIT or COMPLETED, we might need to do something + nice to put the easy_handle in a good known state when this returns. */ + if(premature) + /* this handle is "alive" so we need to count down the total number of + alive connections when this is removed */ + multi->num_alive--; - /* If the 'state' is not INIT or COMPLETED, we might need to do something - nice to put the easy_handle in a good known state when this returns. */ - if(premature) - /* this handle is "alive" so we need to count down the total number of - alive connections when this is removed */ - multi->num_alive--; - - if(data->easy_conn && - data->mstate > CURLM_STATE_DO && - data->mstate < CURLM_STATE_COMPLETED) { - /* 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. */ - connclose(data->easy_conn, "Removed with partial response"); - /* Set connection owner so that Curl_done() closes it. - We can safely do this here since connection is killed. */ - data->easy_conn->data = easy; - easy_owns_conn = TRUE; - } + if(data->easy_conn && + (data->easy_conn->send_pipe->size + + data->easy_conn->recv_pipe->size > 1) && + data->mstate > CURLM_STATE_WAITDO && + data->mstate < CURLM_STATE_COMPLETED) { + /* 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. */ + connclose(data->easy_conn, "Removed with partial response"); + /* Set connection owner so that Curl_done() closes it. + We can sefely do this here since connection is killed. */ + data->easy_conn->data = easy; + } - /* The timer must be shut down before data->multi is set to NULL, - else the timenode will remain in the splay tree after - curl_easy_cleanup is called. */ - Curl_expire(data, 0); + /* The timer must be shut down before data->multi is set to NULL, + else the timenode will remain in the splay tree after + curl_easy_cleanup is called. */ + Curl_expire(data, 0); - /* destroy the timeout list that is held in the easy handle */ - if(data->state.timeoutlist) { - Curl_llist_destroy(data->state.timeoutlist, NULL); - data->state.timeoutlist = NULL; - } + /* destroy the timeout list that is held in the easy handle */ + if(data->state.timeoutlist) { + Curl_llist_destroy(data->state.timeoutlist, NULL); + data->state.timeoutlist = NULL; + } - 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->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) { + if(data->easy_conn) { - /* we must call Curl_done() here (if we still "own it") so that we don't - leave a half-baked one around */ - if(easy_owns_conn) { + /* we must call Curl_done() here (if we still "own it") so that we don't + leave a half-baked one around */ + if(easy_owns_conn) { - /* Curl_done() clears the conn->data field to lose the association - between the easy handle and the connection + /* Curl_done() clears the conn->data field to lose the association + between the easy handle and the connection - Note that this ignores the return code simply because there's - nothing really useful to do with it anyway! */ - (void)Curl_done(&data->easy_conn, data->result, premature); + Note that this ignores the return code simply because there's + nothing really useful to do with it anyway! */ + (void)Curl_done(&data->easy_conn, data->result, premature); + } + else + /* Clear connection pipelines, if Curl_done above was not called */ + Curl_getoff_all_pipelines(data, data->easy_conn); } - else - /* Clear connection pipelines, if Curl_done above was not called */ - Curl_getoff_all_pipelines(data, data->easy_conn); - } - Curl_wildcard_dtor(&data->wildcard); + Curl_wildcard_dtor(&data->wildcard); - /* as this was using a shared connection cache we clear the pointer to that - since we're not part of that multi handle anymore */ - data->state.conn_cache = 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 */ + data->state.conn_cache = NULL; - /* change state without using multistate(), only to make singlesocket() do - what we want */ - data->mstate = CURLM_STATE_COMPLETED; - singlesocket(multi, easy); /* to let the application know what sockets that - vanish with this handle */ + /* change state without using multistate(), only to make singlesocket() do + what we want */ + data->mstate = CURLM_STATE_COMPLETED; + singlesocket(multi, easy); /* to let the application know what sockets + that vanish with this handle */ - /* Remove the association between the connection and the handle */ - if(data->easy_conn) { - data->easy_conn->data = NULL; - data->easy_conn = NULL; - } + /* Remove the association between the connection and the handle */ + if(data->easy_conn) { + data->easy_conn->data = NULL; + data->easy_conn = NULL; + } - data->multi = NULL; /* clear the association to this multi handle */ + data->multi = NULL; /* clear the association to this multi handle */ - /* make sure there's no pending message in the queue sent from this easy - handle */ + { + /* make sure there's no pending message in the queue sent from this easy + handle */ + struct curl_llist_element *e; - for(e = multi->msglist->head; e; e = e->next) { - struct Curl_message *msg = e->ptr; + 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); - /* there can only be one from this specific handle */ - break; + if(msg->extmsg.easy_handle == easy) { + Curl_llist_remove(multi->msglist, e, NULL); + /* there can only be one from this specific handle */ + break; + } + } } - } - /* make the previous node point to our next */ - if(data->prev) - data->prev->next = data->next; - else - multi->easyp = data->next; /* point to first node */ + /* make the previous node point to our next */ + if(data->prev) + data->prev->next = data->next; + else + multi->easyp = data->next; /* point to first node */ - /* make our next point to our previous node */ - if(data->next) - data->next->prev = data->prev; - else - multi->easylp = data->prev; /* point to last node */ + /* make our next point to our previous node */ + if(data->next) + data->next->prev = data->prev; + else + multi->easylp = data->prev; /* point to last node */ - /* NOTE NOTE NOTE - We do not touch the easy handle here! */ - multi->num_easy--; /* one less to care about now */ + /* NOTE NOTE NOTE + We do not touch the easy handle here! */ - update_timer(multi); - return CURLM_OK; + multi->num_easy--; /* one less to care about now */ + + update_timer(multi); + return CURLM_OK; + } + else + return CURLM_BAD_EASY_HANDLE; /* twasn't found */ } bool Curl_multi_pipeline_enabled(const struct Curl_multi *multi) @@ -932,8 +927,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, bool protocol_connect = FALSE; bool dophase_done = FALSE; bool done = FALSE; - CURLMcode rc; - CURLcode result = CURLE_OK; + CURLMcode result = CURLM_OK; struct SingleRequest *k; long timeout_ms; int control; @@ -942,25 +936,26 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, return CURLM_BAD_EASY_HANDLE; do { + /* this is a single-iteration do-while loop just to allow a + break to skip to the end of it */ bool disconnect_conn = FALSE; - rc = CURLM_OK; /* Handle the case when the pipe breaks, i.e., the connection we're using gets cleaned up and we're left with nothing. */ if(data->state.pipe_broke) { - infof(data, "Pipe broke: handle %p, url = %s\n", + infof(data, "Pipe broke: handle 0x%p, url = %s\n", (void *)data, data->state.path); if(data->mstate < CURLM_STATE_COMPLETED) { /* Head back to the CONNECT state */ multistate(data, CURLM_STATE_CONNECT); - rc = CURLM_CALL_MULTI_PERFORM; - result = CURLE_OK; + result = CURLM_CALL_MULTI_PERFORM; + data->result = CURLE_OK; } data->state.pipe_broke = FALSE; data->easy_conn = NULL; - continue; + break; } if(!data->easy_conn && @@ -1013,27 +1008,26 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, } } - /* Force connection closed if the connection has indeed been used */ - if(data->mstate > CURLM_STATE_DO) { - connclose(data->easy_conn, "Disconnected with pending data"); - disconnect_conn = TRUE; - } - result = CURLE_OPERATION_TIMEDOUT; - /* Skip the statemachine and go directly to error handling section. */ - goto statemachine_end; + /* Force the connection closed because the server could continue to + send us stuff at any time. (The disconnect_conn logic used below + doesn't work at this point). */ + connclose(data->easy_conn, "Disconnected with pending data"); + data->result = CURLE_OPERATION_TIMEDOUT; + multistate(data, CURLM_STATE_COMPLETED); + break; } } switch(data->mstate) { case CURLM_STATE_INIT: /* init this transfer. */ - result=Curl_pretransfer(data); + data->result=Curl_pretransfer(data); - if(!result) { + if(CURLE_OK == data->result) { /* after init, go CONNECT */ multistate(data, CURLM_STATE_CONNECT); Curl_pgrsTime(data, TIMER_STARTOP); - rc = CURLM_CALL_MULTI_PERFORM; + result = CURLM_CALL_MULTI_PERFORM; } break; @@ -1045,25 +1039,20 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, case CURLM_STATE_CONNECT: /* Connect. We want to get a connection identifier filled in. */ Curl_pgrsTime(data, TIMER_STARTSINGLE); - result = Curl_connect(data, &data->easy_conn, - &async, &protocol_connect); - if(CURLE_NO_CONNECTION_AVAILABLE == result) { + data->result = Curl_connect(data, &data->easy_conn, + &async, &protocol_connect); + if(CURLE_NO_CONNECTION_AVAILABLE == data->result) { /* There was no connection available. We will go to the pending state and wait for an available connection. */ 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; + data->result = CURLE_OK; break; } - if(!result) { + if(CURLE_OK == data->result) { /* Add this handle to the send or pend pipeline */ - result = Curl_add_handle_to_pipeline(data, data->easy_conn); - if(result) + data->result = Curl_add_handle_to_pipeline(data, data->easy_conn); + if(CURLE_OK != data->result) disconnect_conn = TRUE; else { if(async) @@ -1073,7 +1062,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, /* after the connect has been sent off, go WAITCONNECT unless the protocol connect is already done and we can go directly to WAITDO or DO! */ - rc = CURLM_CALL_MULTI_PERFORM; + result = CURLM_CALL_MULTI_PERFORM; if(protocol_connect) multistate(data, multi->pipelining_enabled? @@ -1095,29 +1084,9 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, /* awaiting an asynch name resolve to complete */ { struct Curl_dns_entry *dns = NULL; - struct connectdata *conn = data->easy_conn; /* check if we have the name resolved by now */ - if(data->share) - Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE); - - dns = Curl_fetch_addr(conn, conn->host.name, (int)conn->port); - - if(dns) { - dns->inuse++; /* we use it! */ -#ifdef CURLRES_ASYNCH - conn->async.dns = dns; - conn->async.done = TRUE; -#endif - result = CURLE_OK; - infof(data, "Hostname was found in DNS cache\n"); - } - - if(data->share) - Curl_share_unlock(data, CURL_LOCK_DATA_DNS); - - if(!dns) - result = Curl_resolver_is_resolved(data->easy_conn, &dns); + data->result = Curl_resolver_is_resolved(data->easy_conn, &dns); /* Update sockets here, because the socket(s) may have been closed and the application thus needs to be told, even if it @@ -1130,15 +1099,16 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, if(dns) { /* Perform the next step in the connection phase, and then move on to the WAITCONNECT state */ - result = Curl_async_resolved(data->easy_conn, &protocol_connect); + data->result = Curl_async_resolved(data->easy_conn, + &protocol_connect); - if(result) + if(CURLE_OK != data->result) /* if Curl_async_resolved() returns failure, the connection struct is already freed and gone */ data->easy_conn = NULL; /* no more connection */ else { /* call again please so that we get the next socket setup */ - rc = CURLM_CALL_MULTI_PERFORM; + result = CURLM_CALL_MULTI_PERFORM; if(protocol_connect) multistate(data, multi->pipelining_enabled? CURLM_STATE_WAITDO:CURLM_STATE_DO); @@ -1153,7 +1123,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, } } - if(result) { + if(CURLE_OK != data->result) { /* failure detected */ disconnect_conn = TRUE; break; @@ -1164,15 +1134,19 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, #ifndef CURL_DISABLE_HTTP case CURLM_STATE_WAITPROXYCONNECT: /* this is HTTP-specific, but sending CONNECT to a proxy is HTTP... */ - result = Curl_http_connect(data->easy_conn, &protocol_connect); + data->result = Curl_http_connect(data->easy_conn, &protocol_connect); if(data->easy_conn->bits.proxy_connect_closed) { - /* connect back to proxy again */ - result = CURLE_OK; - rc = CURLM_CALL_MULTI_PERFORM; + /* reset the error buffer */ + if(data->set.errorbuffer) + data->set.errorbuffer[0] = '\0'; + data->state.errorbuf = FALSE; + + data->result = CURLE_OK; + result = CURLM_CALL_MULTI_PERFORM; multistate(data, CURLM_STATE_CONNECT); } - else if(!result) { + else if(CURLE_OK == data->result) { if(data->easy_conn->tunnel_state[FIRSTSOCKET] == TUNNEL_COMPLETE) multistate(data, CURLM_STATE_WAITCONNECT); } @@ -1181,27 +1155,19 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, case CURLM_STATE_WAITCONNECT: /* awaiting a completion of an asynch connect */ - result = Curl_is_connected(data->easy_conn, - FIRSTSOCKET, - &connected); + data->result = Curl_is_connected(data->easy_conn, + FIRSTSOCKET, + &connected); if(connected) { - if(!result) + if(!data->result) /* if everything is still fine we do the protocol-specific connect setup */ - result = Curl_protocol_connect(data->easy_conn, - &protocol_connect); + data->result = Curl_protocol_connect(data->easy_conn, + &protocol_connect); } - if(data->easy_conn->bits.proxy_connect_closed) { - /* connect back to proxy again since it was closed in a proxy CONNECT - setup */ - result = CURLE_OK; - rc = CURLM_CALL_MULTI_PERFORM; - multistate(data, CURLM_STATE_CONNECT); - break; - } - else if(result) { + if(CURLE_OK != data->result) { /* failure detected */ /* Just break, the cleaning up is handled all in one place */ disconnect_conn = TRUE; @@ -1228,23 +1194,24 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, multistate(data, multi->pipelining_enabled? CURLM_STATE_WAITDO:CURLM_STATE_DO); - rc = CURLM_CALL_MULTI_PERFORM; + result = CURLM_CALL_MULTI_PERFORM; } break; case CURLM_STATE_PROTOCONNECT: /* protocol-specific connect phase */ - result = Curl_protocol_connecting(data->easy_conn, &protocol_connect); - if(!result && protocol_connect) { + data->result = Curl_protocol_connecting(data->easy_conn, + &protocol_connect); + if((data->result == CURLE_OK) && protocol_connect) { /* after the connect has completed, go WAITDO or DO */ multistate(data, multi->pipelining_enabled? CURLM_STATE_WAITDO:CURLM_STATE_DO); - rc = CURLM_CALL_MULTI_PERFORM; + result = CURLM_CALL_MULTI_PERFORM; } - else if(result) { + else if(data->result) { /* failure detected */ Curl_posttransfer(data); - Curl_done(&data->easy_conn, result, TRUE); + Curl_done(&data->easy_conn, data->result, TRUE); disconnect_conn = TRUE; } break; @@ -1265,7 +1232,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, /* Grab the channel */ data->easy_conn->writechannel_inuse = TRUE; multistate(data, CURLM_STATE_DO); - rc = CURLM_CALL_MULTI_PERFORM; + result = CURLM_CALL_MULTI_PERFORM; } break; @@ -1274,16 +1241,16 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, /* keep connection open for application to use the socket */ connkeep(data->easy_conn, "CONNECT_ONLY"); multistate(data, CURLM_STATE_DONE); - result = CURLE_OK; - rc = CURLM_CALL_MULTI_PERFORM; + data->result = CURLE_OK; + result = CURLM_CALL_MULTI_PERFORM; } else { /* Perform the protocol's DO action */ - result = Curl_do(&data->easy_conn, &dophase_done); + data->result = Curl_do(&data->easy_conn, &dophase_done); /* When Curl_do() returns failure, data->easy_conn might be NULL! */ - if(!result) { + if(CURLE_OK == data->result) { if(!dophase_done) { /* some steps needed for wildcard matching */ if(data->set.wildcardmatch) { @@ -1292,14 +1259,14 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, /* skip some states if it is important */ Curl_done(&data->easy_conn, CURLE_OK, FALSE); multistate(data, CURLM_STATE_DONE); - rc = CURLM_CALL_MULTI_PERFORM; + result = CURLM_CALL_MULTI_PERFORM; break; } } /* DO was not completed in one function call, we must continue DOING... */ multistate(data, CURLM_STATE_DOING); - rc = CURLM_OK; + result = CURLM_OK; } /* after DO, go DO_DONE... or DO_MORE */ @@ -1307,15 +1274,15 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, /* we're supposed to do more, but we need to sit down, relax and wait a little while first */ multistate(data, CURLM_STATE_DO_MORE); - rc = CURLM_OK; + result = CURLM_OK; } else { /* we're done with the DO, now DO_DONE */ multistate(data, CURLM_STATE_DO_DONE); - rc = CURLM_CALL_MULTI_PERFORM; + result = CURLM_CALL_MULTI_PERFORM; } } - else if((CURLE_SEND_ERROR == result) && + else if((CURLE_SEND_ERROR == data->result) && data->easy_conn->bits.reuse) { /* * In this situation, a connection that we were trying to use @@ -1330,49 +1297,48 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, drc = Curl_retry_request(data->easy_conn, &newurl); if(drc) { /* a failure here pretty much implies an out of memory */ - result = drc; + data->result = drc; disconnect_conn = TRUE; } else retry = (newurl)?TRUE:FALSE; Curl_posttransfer(data); - drc = Curl_done(&data->easy_conn, result, FALSE); + drc = Curl_done(&data->easy_conn, data->result, FALSE); /* When set to retry the connection, we must to go back to * the CONNECT state */ if(retry) { - if(!drc || (drc == CURLE_SEND_ERROR)) { + if((drc == CURLE_OK) || (drc == CURLE_SEND_ERROR)) { follow = FOLLOW_RETRY; drc = Curl_follow(data, newurl, follow); - if(!drc) { + if(drc == CURLE_OK) { multistate(data, CURLM_STATE_CONNECT); - rc = CURLM_CALL_MULTI_PERFORM; - result = CURLE_OK; + result = CURLM_CALL_MULTI_PERFORM; + data->result = CURLE_OK; } else { /* Follow failed */ - result = drc; + data->result = drc; free(newurl); } } else { /* done didn't return OK or SEND_ERROR */ - result = drc; + data->result = drc; free(newurl); } } else { /* Have error handler disconnect conn if we can't retry */ disconnect_conn = TRUE; - free(newurl); } } else { /* failure detected */ Curl_posttransfer(data); if(data->easy_conn) - Curl_done(&data->easy_conn, result, FALSE); + Curl_done(&data->easy_conn, data->result, FALSE); disconnect_conn = TRUE; } } @@ -1380,21 +1346,21 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, case CURLM_STATE_DOING: /* we continue DOING until the DO phase is complete */ - result = Curl_protocol_doing(data->easy_conn, - &dophase_done); - if(!result) { + data->result = Curl_protocol_doing(data->easy_conn, + &dophase_done); + if(CURLE_OK == data->result) { if(dophase_done) { /* after DO, go DO_DONE or DO_MORE */ multistate(data, data->easy_conn->bits.do_more? CURLM_STATE_DO_MORE: CURLM_STATE_DO_DONE); - rc = CURLM_CALL_MULTI_PERFORM; + result = CURLM_CALL_MULTI_PERFORM; } /* dophase_done */ } else { /* failure detected */ Curl_posttransfer(data); - Curl_done(&data->easy_conn, result, FALSE); + Curl_done(&data->easy_conn, data->result, FALSE); disconnect_conn = TRUE; } break; @@ -1403,27 +1369,27 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, /* * When we are connected, DO MORE and then go DO_DONE */ - result = Curl_do_more(data->easy_conn, &control); + data->result = Curl_do_more(data->easy_conn, &control); /* No need to remove this handle from the send pipeline here since that is done in Curl_done() */ - if(!result) { + if(CURLE_OK == data->result) { if(control) { /* if positive, advance to DO_DONE if negative, go back to DOING */ multistate(data, control==1? CURLM_STATE_DO_DONE: CURLM_STATE_DOING); - rc = CURLM_CALL_MULTI_PERFORM; + result = CURLM_CALL_MULTI_PERFORM; } else /* stay in DO_MORE */ - rc = CURLM_OK; + result = CURLM_OK; } else { /* failure detected */ Curl_posttransfer(data); - Curl_done(&data->easy_conn, result, FALSE); + Curl_done(&data->easy_conn, data->result, FALSE); disconnect_conn = TRUE; } break; @@ -1441,7 +1407,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, multistate(data, CURLM_STATE_WAITPERFORM); else multistate(data, CURLM_STATE_DONE); - rc = CURLM_CALL_MULTI_PERFORM; + result = CURLM_CALL_MULTI_PERFORM; break; case CURLM_STATE_WAITPERFORM: @@ -1452,7 +1418,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, /* Grab the channel */ data->easy_conn->readchannel_inuse = TRUE; multistate(data, CURLM_STATE_PERFORM); - rc = CURLM_CALL_MULTI_PERFORM; + result = CURLM_CALL_MULTI_PERFORM; } #ifdef DEBUGBUILD else { @@ -1469,9 +1435,9 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, case CURLM_STATE_TOOFAST: /* limit-rate exceeded in either direction */ /* if both rates are within spec, resume transfer */ if(Curl_pgrsUpdate(data->easy_conn)) - result = CURLE_ABORTED_BY_CALLBACK; + data->result = CURLE_ABORTED_BY_CALLBACK; else - result = Curl_speedcheck(data, now); + data->result = Curl_speedcheck(data, now); if(( (data->set.max_send_speed == 0) || (data->progress.ulspeed < data->set.max_send_speed )) && @@ -1481,7 +1447,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, break; case CURLM_STATE_PERFORM: - { + { char *newurl = NULL; bool retry = FALSE; @@ -1497,7 +1463,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, data->set.buffer_size : BUFSIZE); timeout_ms = Curl_sleep_time(data->set.max_send_speed, data->progress.ulspeed, buffersize); - Curl_expire_latest(data, timeout_ms); + Curl_expire(data, timeout_ms); break; } @@ -1508,17 +1474,17 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, multistate(data, CURLM_STATE_TOOFAST); - /* Calculate download rate-limitation timeout. */ + /* Calculate download rate-limitation timeout. */ buffersize = (int)(data->set.buffer_size ? data->set.buffer_size : BUFSIZE); timeout_ms = Curl_sleep_time(data->set.max_recv_speed, data->progress.dlspeed, buffersize); - Curl_expire_latest(data, timeout_ms); + Curl_expire(data, timeout_ms); break; } /* read/write data if it is ready to do so */ - result = Curl_readwrite(data->easy_conn, &done); + data->result = Curl_readwrite(data->easy_conn, &done); k = &data->req; @@ -1532,7 +1498,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, data->easy_conn->writechannel_inuse = FALSE; } - if(done || (result == CURLE_RECV_ERROR)) { + if(done || (data->result == CURLE_RECV_ERROR)) { /* If CURLE_RECV_ERROR happens early enough, we assume it was a race * condition and the server closed the re-used connection exactly when * we wanted to use it, so figure out if that is indeed the case. @@ -1544,12 +1510,12 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, if(retry) { /* if we are to retry, set the result to OK and consider the request as done */ - result = CURLE_OK; + data->result = CURLE_OK; done = TRUE; } } - if(result) { + if(data->result) { /* * The transfer phase returned error, we mark the connection to get * closed to prevent being re-used. This is because we can't possibly @@ -1562,7 +1528,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, connclose(data->easy_conn, "Transfer returned error"); Curl_posttransfer(data); - Curl_done(&data->easy_conn, result, FALSE); + Curl_done(&data->easy_conn, data->result, FALSE); } else if(done) { followtype follow=FOLLOW_NONE; @@ -1575,7 +1541,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, /* expire the new receiving pipeline head */ if(data->easy_conn->recv_pipe->head) - Curl_expire_latest(data->easy_conn->recv_pipe->head->ptr, 1); + Curl_expire(data->easy_conn->recv_pipe->head->ptr, 1); /* Check if we can move pending requests to send pipe */ Curl_multi_process_pending_handles(multi); @@ -1586,20 +1552,18 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, if(!retry) { /* if the URL is a follow-location and not just a retried request then figure out the URL here */ - if(newurl) - free(newurl); newurl = data->req.newurl; data->req.newurl = NULL; follow = FOLLOW_REDIR; } else follow = FOLLOW_RETRY; - result = Curl_done(&data->easy_conn, CURLE_OK, FALSE); - if(!result) { - result = Curl_follow(data, newurl, follow); - if(!result) { + data->result = Curl_done(&data->easy_conn, CURLE_OK, FALSE); + if(CURLE_OK == data->result) { + data->result = Curl_follow(data, newurl, follow); + if(CURLE_OK == data->result) { multistate(data, CURLM_STATE_CONNECT); - rc = CURLM_CALL_MULTI_PERFORM; + result = CURLM_CALL_MULTI_PERFORM; newurl = NULL; /* handed over the memory ownership to Curl_follow(), make sure we don't free() it here */ @@ -1616,26 +1580,26 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, free(newurl); newurl = data->req.location; data->req.location = NULL; - result = Curl_follow(data, newurl, FOLLOW_FAKE); - if(!result) + data->result = Curl_follow(data, newurl, FOLLOW_FAKE); + if(CURLE_OK == data->result) newurl = NULL; /* allocation was handed over Curl_follow() */ else disconnect_conn = TRUE; } multistate(data, CURLM_STATE_DONE); - rc = CURLM_CALL_MULTI_PERFORM; + result = CURLM_CALL_MULTI_PERFORM; } } if(newurl) free(newurl); break; - } + } case CURLM_STATE_DONE: /* this state is highly transient, so run another loop after this */ - rc = CURLM_CALL_MULTI_PERFORM; + result = CURLM_CALL_MULTI_PERFORM; if(data->easy_conn) { CURLcode res; @@ -1646,11 +1610,11 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, Curl_multi_process_pending_handles(multi); /* post-transfer command */ - res = Curl_done(&data->easy_conn, result, FALSE); + res = Curl_done(&data->easy_conn, data->result, FALSE); /* allow a previously set error code take precedence */ - if(!result) - result = res; + if(!data->result) + data->result = res; /* * If there are other handles on the pipeline, Curl_done won't set @@ -1690,16 +1654,14 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, break; case CURLM_STATE_MSGSENT: - data->result = result; return CURLM_OK; /* do nothing */ default: return CURLM_INTERNAL_ERROR; } - statemachine_end: if(data->mstate < CURLM_STATE_COMPLETED) { - if(result) { + if(CURLE_OK != data->result) { /* * If an error was returned, and we aren't in completed state now, * then we go to completed and consider this transfer aborted. @@ -1714,16 +1676,16 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, /* if this has a connection, unsubscribe from the pipelines */ data->easy_conn->writechannel_inuse = FALSE; data->easy_conn->readchannel_inuse = FALSE; - 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); /* Check if we can move pending requests to send pipe */ Curl_multi_process_pending_handles(multi); if(disconnect_conn) { - /* Don't attempt to send data over a connection that timed out */ - bool dead_connection = result == CURLE_OPERATION_TIMEDOUT; /* disconnect properly */ - Curl_disconnect(data->easy_conn, dead_connection); + Curl_disconnect(data->easy_conn, /* dead_connection */ FALSE); /* This is where we make sure that the easy_conn pointer is reset. We don't have to do this in every case block above where a @@ -1742,34 +1704,31 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, else if(data->easy_conn && Curl_pgrsUpdate(data->easy_conn)) { /* aborted due to progress callback return code must close the connection */ - result = CURLE_ABORTED_BY_CALLBACK; + data->result = CURLE_ABORTED_BY_CALLBACK; connclose(data->easy_conn, "Aborted by callback"); /* if not yet in DONE state, go there, otherwise COMPLETED */ multistate(data, (data->mstate < CURLM_STATE_DONE)? CURLM_STATE_DONE: CURLM_STATE_COMPLETED); - rc = CURLM_CALL_MULTI_PERFORM; + result = CURLM_CALL_MULTI_PERFORM; } } + } WHILE_FALSE; /* just to break out from! */ - if(CURLM_STATE_COMPLETED == data->mstate) { - /* now fill in the Curl_message with this info */ - msg = &data->msg; - - msg->extmsg.msg = CURLMSG_DONE; - msg->extmsg.easy_handle = data; - msg->extmsg.data.result = result; + if(CURLM_STATE_COMPLETED == data->mstate) { + /* now fill in the Curl_message with this info */ + msg = &data->msg; - rc = multi_addmsg(multi, msg); - - multistate(data, CURLM_STATE_MSGSENT); - } - } while(rc == CURLM_CALL_MULTI_PERFORM); + msg->extmsg.msg = CURLMSG_DONE; + msg->extmsg.easy_handle = data; + msg->extmsg.data.result = data->result; - data->result = result; + result = multi_addmsg(multi, msg); + multistate(data, CURLM_STATE_MSGSENT); + } - return rc; + return result; } @@ -1799,7 +1758,9 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles) } sigpipe_ignore(data, &pipe_st); - result = multi_runsingle(multi, now, data); + do + result = multi_runsingle(multi, now, data); + while(CURLM_CALL_MULTI_PERFORM == result); sigpipe_restore(&pipe_st); if(data->set.wildcardmatch) { @@ -1882,12 +1843,18 @@ CURLMcode curl_multi_cleanup(CURLM *multi_handle) multi->closure_handle->dns.hostcache); Curl_close(multi->closure_handle); + multi->closure_handle = NULL; } Curl_hash_destroy(multi->sockhash); + multi->sockhash = NULL; + Curl_conncache_destroy(multi->conn_cache); + multi->conn_cache = NULL; + + /* remove the pending list of messages */ Curl_llist_destroy(multi->msglist, NULL); - Curl_llist_destroy(multi->pending, NULL); + multi->msglist = NULL; /* remove all easy handles */ data = multi->easyp; @@ -1908,6 +1875,7 @@ CURLMcode curl_multi_cleanup(CURLM *multi_handle) } Curl_hash_destroy(multi->hostcache); + multi->hostcache = NULL; /* Free the blacklists by setting them to NULL */ Curl_pipeline_set_site_blacklist(NULL, &multi->pipelining_site_bl); @@ -2116,7 +2084,7 @@ static void singlesocket(struct Curl_multi *multi, * Curl_multi_closed() * * Used by the connect code to tell the multi_socket code that one of the - * sockets we were using is about to be closed. This function will then + * sockets we were using have just been closed. This function will then * remove it from the sockethash for this handle to make the multi_socket API * behave properly, especially for the case when libcurl will create another * socket again and it gets the same file descriptor number. @@ -2269,7 +2237,9 @@ static CURLMcode multi_socket(struct Curl_multi *multi, data->easy_conn->cselect_bits = ev_bitmask; sigpipe_ignore(data, &pipe_st); - result = multi_runsingle(multi, now, data); + do + result = multi_runsingle(multi, now, data); + while(CURLM_CALL_MULTI_PERFORM == result); sigpipe_restore(&pipe_st); if(data->easy_conn && @@ -2311,7 +2281,9 @@ static CURLMcode multi_socket(struct Curl_multi *multi, SIGPIPE_VARIABLE(pipe_st); sigpipe_ignore(data, &pipe_st); - result = multi_runsingle(multi, now, data); + do + result = multi_runsingle(multi, now, data); + while(CURLM_CALL_MULTI_PERFORM == result); sigpipe_restore(&pipe_st); if(CURLM_OK >= result) @@ -2514,6 +2486,12 @@ static int update_timer(struct Curl_multi *multi) return multi->timer_cb((CURLM*)multi, timeout_ms, multi->timer_userp); } +void Curl_multi_set_easy_connection(struct SessionHandle *handle, + struct connectdata *conn) +{ + handle->easy_conn = conn; +} + static bool isHandleAtHead(struct SessionHandle *handle, struct curl_llist *pipeline) { @@ -2676,46 +2654,6 @@ void Curl_expire(struct SessionHandle *data, long milli) #endif } -/* - * 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. - * - * 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. - * - */ -void Curl_expire_latest(struct SessionHandle *data, long milli) -{ - struct timeval *expire = &data->state.expiretime; - - struct timeval set; - - set = Curl_tvnow(); - set.tv_sec += 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. */ - long 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); -} - CURLMcode curl_multi_assign(CURLM *multi_handle, curl_socket_t s, void *hashp) { @@ -2770,23 +2708,16 @@ struct curl_llist *Curl_multi_pipelining_server_bl(struct Curl_multi *multi) void Curl_multi_process_pending_handles(struct Curl_multi *multi) { - struct curl_llist_element *e = multi->pending->head; - - while(e) { - struct SessionHandle *data = e->ptr; - struct curl_llist_element *next = e->next; + struct SessionHandle *data; + data=multi->easyp; + while(data) { if(data->mstate == CURLM_STATE_CONNECT_PEND) { multistate(data, CURLM_STATE_CONNECT); - - /* Remove this node from the list */ - Curl_llist_remove(multi->pending, e, NULL); - /* Make sure that the handle will be processed soonish. */ - Curl_expire_latest(data, 1); + Curl_expire(data, 1); } - - e = next; /* operate on next handle */ + data = data->next; /* operate on next handle */ } } diff --git a/lib/multihandle.h b/lib/multihandle.h index 1a4b1d9..552aa93 100644 --- a/lib/multihandle.h +++ b/lib/multihandle.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , 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,6 @@ struct Curl_multi { struct curl_llist *msglist; /* a list of messages from completed transfers */ - struct curl_llist *pending; /* SessionHandles that are in the - CURLM_STATE_CONNECT_PEND state */ - /* callback function and user data pointer for the *socket() API */ curl_socket_callback socket_cb; void *socket_userp; diff --git a/lib/multiif.h b/lib/multiif.h index d8acfca..1cbd310 100644 --- a/lib/multiif.h +++ b/lib/multiif.h @@ -26,7 +26,6 @@ * Prototypes for library-wide functions provided by multi.c */ void Curl_expire(struct SessionHandle *data, long milli); -void Curl_expire_latest(struct SessionHandle *data, long milli); bool Curl_multi_pipeline_enabled(const struct Curl_multi* multi); void Curl_multi_handlePipeBreak(struct SessionHandle *data); @@ -55,6 +54,10 @@ struct Curl_multi *Curl_multi_handle(int hashsize, int chashsize); void Curl_multi_dump(const struct Curl_multi *multi_handle); #endif +/* Update the current connection of a One_Easy handle */ +void Curl_multi_set_easy_connection(struct SessionHandle *handle, + struct connectdata *conn); + void Curl_multi_process_pending_handles(struct Curl_multi *multi); /* Return the value of the CURLMOPT_MAX_HOST_CONNECTIONS option */ @@ -82,7 +85,7 @@ size_t Curl_multi_max_total_connections(struct Curl_multi *multi); * Curl_multi_closed() * * Used by the connect code to tell the multi_socket code that one of the - * sockets we were using is about to be closed. This function will then + * sockets we were using have just been closed. This function will then * remove it from the sockethash for this handle to make the multi_socket API * behave properly, especially for the case when libcurl will create another * socket again and it gets the same file descriptor number. diff --git a/lib/non-ascii.c b/lib/non-ascii.c index 6ccb449..91d6a54 100644 --- a/lib/non-ascii.c +++ b/lib/non-ascii.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * 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 @@ -82,16 +82,17 @@ CURLcode Curl_convert_clone(struct SessionHandle *data, CURLcode Curl_convert_to_network(struct SessionHandle *data, char *buffer, size_t length) { + CURLcode rc; + if(data->set.convtonetwork) { /* use translation callback */ - CURLcode result = data->set.convtonetwork(buffer, length); - if(result) { + rc = data->set.convtonetwork(buffer, length); + if(rc != CURLE_OK) { failf(data, "CURLOPT_CONV_TO_NETWORK_FUNCTION callback returned %d: %s", - (int)result, curl_easy_strerror(result)); + (int)rc, curl_easy_strerror(rc)); } - - return result; + return rc; } else { #ifdef HAVE_ICONV @@ -142,16 +143,17 @@ CURLcode Curl_convert_to_network(struct SessionHandle *data, CURLcode Curl_convert_from_network(struct SessionHandle *data, char *buffer, size_t length) { + CURLcode rc; + if(data->set.convfromnetwork) { /* use translation callback */ - CURLcode result = data->set.convfromnetwork(buffer, length); - if(result) { + rc = data->set.convfromnetwork(buffer, length); + if(rc != CURLE_OK) { failf(data, "CURLOPT_CONV_FROM_NETWORK_FUNCTION callback returned %d: %s", - (int)result, curl_easy_strerror(result)); + (int)rc, curl_easy_strerror(rc)); } - - return result; + return rc; } else { #ifdef HAVE_ICONV @@ -202,16 +204,17 @@ CURLcode Curl_convert_from_network(struct SessionHandle *data, CURLcode Curl_convert_from_utf8(struct SessionHandle *data, char *buffer, size_t length) { + CURLcode rc; + if(data->set.convfromutf8) { /* use translation callback */ - CURLcode result = data->set.convfromutf8(buffer, length); - if(result) { + rc = data->set.convfromutf8(buffer, length); + if(rc != CURLE_OK) { failf(data, "CURLOPT_CONV_FROM_UTF8_FUNCTION callback returned %d: %s", - (int)result, curl_easy_strerror(result)); + (int)rc, curl_easy_strerror(rc)); } - - return result; + return rc; } else { #ifdef HAVE_ICONV @@ -316,22 +319,24 @@ void Curl_convert_close(struct SessionHandle *data) */ CURLcode Curl_convert_form(struct SessionHandle *data, struct FormData *form) { - CURLcode result; + struct FormData *next; + CURLcode rc; + + if(!form) + return CURLE_OK; if(!data) return CURLE_BAD_FUNCTION_ARGUMENT; - while(form) { + do { + next=form->next; /* the following form line */ if(form->type == FORM_DATA) { - result = Curl_convert_to_network(data, form->line, form->length); + rc = Curl_convert_to_network(data, form->line, form->length); /* Curl_convert_to_network calls failf if unsuccessful */ - if(result) - return result; + if(rc != CURLE_OK) + return rc; } - - form = form->next; - } - + } while((form = next) != NULL); /* continue */ return CURLE_OK; } diff --git a/lib/openldap.c b/lib/openldap.c index b94c034..df8d938 100644 --- a/lib/openldap.c +++ b/lib/openldap.c @@ -59,7 +59,7 @@ extern int ldap_init_fd(ber_socket_t fd, int proto, const char *url, LDAP **ld); #endif -static CURLcode ldap_setup_connection(struct connectdata *conn); +static CURLcode ldap_setup(struct connectdata *conn); static CURLcode ldap_do(struct connectdata *conn, bool *done); static CURLcode ldap_done(struct connectdata *conn, CURLcode, bool); static CURLcode ldap_connect(struct connectdata *conn, bool *done); @@ -74,7 +74,7 @@ static Curl_recv ldap_recv; const struct Curl_handler Curl_handler_ldap = { "LDAP", /* scheme */ - ldap_setup_connection, /* setup_connection */ + ldap_setup, /* setup_connection */ ldap_do, /* do_it */ ldap_done, /* done */ ZERO_NULL, /* do_more */ @@ -99,7 +99,7 @@ const struct Curl_handler Curl_handler_ldap = { const struct Curl_handler Curl_handler_ldaps = { "LDAPS", /* scheme */ - ldap_setup_connection, /* setup_connection */ + ldap_setup, /* setup_connection */ ldap_do, /* do_it */ ldap_done, /* done */ ZERO_NULL, /* do_more */ @@ -148,7 +148,7 @@ typedef struct ldapreqinfo { int nument; } ldapreqinfo; -static CURLcode ldap_setup_connection(struct connectdata *conn) +static CURLcode ldap_setup(struct connectdata *conn) { ldapconninfo *li; LDAPURLDesc *lud; @@ -190,11 +190,9 @@ static Sockbuf_IO ldapsb_tls; static CURLcode ldap_connect(struct connectdata *conn, bool *done) { ldapconninfo *li = conn->proto.generic; - struct SessionHandle *data = conn->data; + struct SessionHandle *data=conn->data; int rc, proto = LDAP_VERSION3; - char hosturl[1024]; - char *ptr; - + char hosturl[1024], *ptr; (void)done; strcpy(hosturl, "ldap"); @@ -215,10 +213,10 @@ static CURLcode ldap_connect(struct connectdata *conn, bool *done) #ifdef USE_SSL if(conn->handler->flags & PROTOPT_SSL) { - CURLcode result; - result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &li->ssldone); - if(result) - return result; + CURLcode res; + res = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &li->ssldone); + if(res) + return res; } #endif @@ -228,8 +226,8 @@ static CURLcode ldap_connect(struct connectdata *conn, bool *done) static CURLcode ldap_connecting(struct connectdata *conn, bool *done) { ldapconninfo *li = conn->proto.generic; - struct SessionHandle *data = conn->data; - LDAPMessage *msg = NULL; + struct SessionHandle *data=conn->data; + LDAPMessage *result = NULL; struct timeval tv = {0,1}, *tvp; int rc, err; char *info = NULL; @@ -238,12 +236,11 @@ static CURLcode ldap_connecting(struct connectdata *conn, bool *done) if(conn->handler->flags & PROTOPT_SSL) { /* Is the SSL handshake complete yet? */ if(!li->ssldone) { - CURLcode result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, - &li->ssldone); - if(result || !li->ssldone) - return result; + CURLcode res = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, + &li->ssldone); + if(res || !li->ssldone) + return res; } - /* Have we installed the libcurl SSL handlers into the sockbuf yet? */ if(!li->sslinst) { Sockbuf *sb; @@ -282,7 +279,7 @@ retry: return CURLE_OK; } - rc = ldap_result(li->ld, li->msgid, LDAP_MSG_ONE, tvp, &msg); + rc = ldap_result(li->ld, li->msgid, LDAP_MSG_ONE, tvp, &result); if(rc < 0) { failf(data, "LDAP local: bind ldap_result %s", ldap_err2string(rc)); return CURLE_LDAP_CANNOT_BIND; @@ -291,13 +288,11 @@ retry: /* timed out */ return CURLE_OK; } - - rc = ldap_parse_result(li->ld, msg, &err, NULL, &info, NULL, NULL, 1); + rc = ldap_parse_result(li->ld, result, &err, NULL, &info, NULL, NULL, 1); if(rc) { failf(data, "LDAP local: bind ldap_parse_result %s", ldap_err2string(rc)); return CURLE_LDAP_CANNOT_BIND; } - /* Try to fallback to LDAPv2? */ if(err == LDAP_PROTOCOL_ERROR) { int proto; @@ -326,7 +321,6 @@ retry: ldap_memfree(info); conn->recv[FIRSTSOCKET] = ldap_recv; *done = TRUE; - return CURLE_OK; } @@ -395,7 +389,6 @@ static CURLcode ldap_done(struct connectdata *conn, CURLcode res, bool premature) { ldapreqinfo *lr = conn->data->req.protop; - (void)res; (void)premature; @@ -409,7 +402,6 @@ static CURLcode ldap_done(struct connectdata *conn, CURLcode res, conn->data->req.protop = NULL; free(lr); } - return CURLE_OK; } @@ -417,19 +409,18 @@ static ssize_t ldap_recv(struct connectdata *conn, int sockindex, char *buf, size_t len, CURLcode *err) { ldapconninfo *li = conn->proto.generic; - struct SessionHandle *data = conn->data; + struct SessionHandle *data=conn->data; ldapreqinfo *lr = data->req.protop; int rc, ret; - LDAPMessage *msg = NULL; + LDAPMessage *result = NULL; LDAPMessage *ent; BerElement *ber = NULL; struct timeval tv = {0,1}; - (void)len; (void)buf; (void)sockindex; - rc = ldap_result(li->ld, lr->msgid, LDAP_MSG_RECEIVED, &tv, &msg); + rc = ldap_result(li->ld, lr->msgid, LDAP_MSG_RECEIVED, &tv, &result); if(rc < 0) { failf(data, "LDAP local: search ldap_result %s", ldap_err2string(rc)); *err = CURLE_RECV_ERROR; @@ -440,10 +431,10 @@ static ssize_t ldap_recv(struct connectdata *conn, int sockindex, char *buf, ret = -1; /* timed out */ - if(!msg) + if(result == NULL) return ret; - for(ent = ldap_first_message(li->ld, msg); ent; + for(ent = ldap_first_message(li->ld, result); ent; ent = ldap_next_message(li->ld, ent)) { struct berval bv, *bvals, **bvp = &bvals; int binary = 0, msgtype; @@ -486,18 +477,9 @@ static ssize_t ldap_recv(struct connectdata *conn, int sockindex, char *buf, *err = CURLE_RECV_ERROR; return -1; } - *err = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"DN: ", 4); - if(*err) - return -1; - - *err = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)bv.bv_val, - bv.bv_len); - if(*err) - return -1; - - *err = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 1); - if(*err) - return -1; + Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"DN: ", 4); + Curl_client_write(conn, CLIENTWRITE_BODY, (char *)bv.bv_val, bv.bv_len); + Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 1); data->req.bytecount += bv.bv_len + 5; for(rc = ldap_get_attribute_ber(li->ld, ent, ber, &bv, bvp); @@ -514,18 +496,10 @@ static ssize_t ldap_recv(struct connectdata *conn, int sockindex, char *buf, for(i=0; bvals[i].bv_val != NULL; i++) { int binval = 0; - *err = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\t", 1); - if(*err) - return -1; - - *err = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)bv.bv_val, - bv.bv_len); - if(*err) - return -1; - - *err = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)":", 1); - if(*err) - return -1; + Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\t", 1); + Curl_client_write(conn, CLIENTWRITE_BODY, (char *)bv.bv_val, + bv.bv_len); + Curl_client_write(conn, CLIENTWRITE_BODY, (char *)":", 1); data->req.bytecount += bv.bv_len + 2; if(!binary) { @@ -555,55 +529,36 @@ static ssize_t ldap_recv(struct connectdata *conn, int sockindex, char *buf, if(error) { ber_memfree(bvals); ber_free(ber, 0); - ldap_msgfree(msg); + ldap_msgfree(result); *err = error; return -1; } - *err = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)": ", 2); - if(*err) - return -1; - + Curl_client_write(conn, CLIENTWRITE_BODY, (char *)": ", 2); data->req.bytecount += 2; if(val_b64_sz > 0) { - *err = Curl_client_write(conn, CLIENTWRITE_BODY, val_b64, - val_b64_sz); - if(*err) - return -1; + Curl_client_write(conn, CLIENTWRITE_BODY, val_b64, val_b64_sz); free(val_b64); data->req.bytecount += val_b64_sz; } } else { - *err = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)" ", 1); - if(*err) - return -1; - - *err = Curl_client_write(conn, CLIENTWRITE_BODY, bvals[i].bv_val, - bvals[i].bv_len); - if(*err) - return -1; - + Curl_client_write(conn, CLIENTWRITE_BODY, (char *)" ", 1); + Curl_client_write(conn, CLIENTWRITE_BODY, bvals[i].bv_val, + bvals[i].bv_len); data->req.bytecount += bvals[i].bv_len + 1; } - *err = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 0); - if(*err) - return -1; - + Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 0); data->req.bytecount++; } ber_memfree(bvals); - *err = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 0); - if(*err) - return -1; + Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 0); data->req.bytecount++; } - *err = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 0); - if(*err) - return -1; + Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 0); data->req.bytecount++; ber_free(ber, 0); } - ldap_msgfree(msg); + ldap_msgfree(result); return ret; } diff --git a/lib/parsedate.c b/lib/parsedate.c index 3e168f5..d7942f5 100644 --- a/lib/parsedate.c +++ b/lib/parsedate.c @@ -530,10 +530,8 @@ static int parsedate(const char *date, time_t *output) /* Add the time zone diff between local time zone and GMT. */ long delta = (long)(tzoff!=-1?tzoff:0); - if((delta>0) && (t > LONG_MAX - delta)) { - *output = 0x7fffffff; - return PARSEDATE_LATER; /* time_t overflow */ - } + if((delta>0) && (t > LONG_MAX - delta)) + return -1; /* time_t overflow */ t += delta; } @@ -545,7 +543,7 @@ static int parsedate(const char *date, time_t *output) time_t curl_getdate(const char *p, const time_t *now) { - time_t parsed = -1; + time_t parsed; int rc = parsedate(p, &parsed); (void)now; /* legacy argument from the past that we ignore */ @@ -563,6 +561,9 @@ time_t curl_getdate(const char *p, const time_t *now) * Curl_gmtime() is a gmtime() replacement for portability. Do not use the * gmtime_r() or gmtime() functions anywhere else but here. * + * To make sure no such function calls slip in, we define them to cause build + * errors, which is why we use the name within parentheses in this function. + * */ CURLcode Curl_gmtime(time_t intime, struct tm *store) diff --git a/lib/pingpong.c b/lib/pingpong.c index 2c2741f..c7e89d0 100644 --- a/lib/pingpong.c +++ b/lib/pingpong.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , 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,7 +165,7 @@ CURLcode Curl_pp_vsendf(struct pingpong *pp, size_t write_len; char *fmt_crlf; char *s; - CURLcode result; + CURLcode error; struct connectdata *conn = pp->conn; struct SessionHandle *data = conn->data; @@ -191,26 +191,26 @@ CURLcode Curl_pp_vsendf(struct pingpong *pp, Curl_pp_init(pp); - result = Curl_convert_to_network(data, s, write_len); + error = Curl_convert_to_network(data, s, write_len); /* Curl_convert_to_network calls failf if unsuccessful */ - if(result) { + if(error) { free(s); - return result; + return error; } #ifdef HAVE_GSSAPI conn->data_prot = PROT_CMD; #endif - result = Curl_write(conn, conn->sock[FIRSTSOCKET], s, write_len, + error = Curl_write(conn, conn->sock[FIRSTSOCKET], s, write_len, &bytes_written); #ifdef HAVE_GSSAPI DEBUGASSERT(data_sec > PROT_NONE && data_sec < PROT_LAST); conn->data_prot = data_sec; #endif - if(result) { + if(error) { free(s); - return result; + return error; } if(conn->data->set.verbose) @@ -247,15 +247,15 @@ CURLcode Curl_pp_vsendf(struct pingpong *pp, CURLcode Curl_pp_sendf(struct pingpong *pp, const char *fmt, ...) { - CURLcode result; + CURLcode res; va_list ap; va_start(ap, fmt); - result = Curl_pp_vsendf(pp, fmt, ap); + res = Curl_pp_vsendf(pp, fmt, ap); va_end(ap); - return result; + return res; } /* @@ -285,6 +285,8 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd, /* number of bytes in the current line, so far */ perline = (ssize_t)(ptr-pp->linestart_resp); + keepon=TRUE; + while((pp->nread_respcache) { @@ -303,28 +305,30 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd, pp->cache_size = 0; /* zero the size just in case */ } else { + int res; #ifdef HAVE_GSSAPI 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, - &gotbytes); + res = Curl_read(conn, sockfd, ptr, BUFSIZE-pp->nread_resp, + &gotbytes); #ifdef HAVE_GSSAPI DEBUGASSERT(prot > PROT_NONE && prot < PROT_LAST); conn->data_prot = prot; #endif - if(result == CURLE_AGAIN) + if(res == CURLE_AGAIN) return CURLE_OK; /* return */ - if(!result && (gotbytes > 0)) + if((res == CURLE_OK) && (gotbytes > 0)) /* convert from the network encoding */ - result = Curl_convert_from_network(data, ptr, gotbytes); + res = Curl_convert_from_network(data, ptr, gotbytes); /* Curl_convert_from_network calls failf if unsuccessful */ - if(result) - /* Set outer result variable to this error. */ + if(CURLE_OK != res) { + result = (CURLcode)res; /* Set outer result variable to this error. */ keepon = FALSE; + } } if(!keepon) @@ -474,9 +478,11 @@ CURLcode Curl_pp_flushsend(struct pingpong *pp) /* we have a piece of a command still left to send */ struct connectdata *conn = pp->conn; ssize_t written; + CURLcode result = CURLE_OK; curl_socket_t sock = conn->sock[FIRSTSOCKET]; - CURLcode result = Curl_write(conn, sock, pp->sendthis + pp->sendsize - - pp->sendleft, pp->sendleft, &written); + + result = Curl_write(conn, sock, pp->sendthis + pp->sendsize - + pp->sendleft, pp->sendleft, &written); if(result) return result; diff --git a/lib/pipeline.c b/lib/pipeline.c index 2645fdb..8d2544b 100644 --- a/lib/pipeline.c +++ b/lib/pipeline.c @@ -99,11 +99,11 @@ CURLcode Curl_add_handle_to_pipeline(struct SessionHandle *handle, { struct curl_llist_element *sendhead = conn->send_pipe->head; struct curl_llist *pipeline; - CURLcode result; + CURLcode rc; pipeline = conn->send_pipe; - result = Curl_addHandleToPipeline(handle, pipeline); + rc = Curl_addHandleToPipeline(handle, pipeline); if(pipeline == conn->send_pipe && sendhead != conn->send_pipe->head) { /* this is a new one as head, expire it */ @@ -115,7 +115,7 @@ CURLcode Curl_add_handle_to_pipeline(struct SessionHandle *handle, print_pipeline(conn); #endif - return result; + return rc; } /* Move this transfer from the sending list to the receiving list. @@ -251,7 +251,7 @@ CURLMcode Curl_pipeline_set_site_blacklist(char **sites, bool Curl_pipeline_server_blacklisted(struct SessionHandle *handle, char *server_name) { - if(handle->multi && server_name) { + if(handle->multi) { struct curl_llist *blacklist = Curl_multi_pipelining_server_bl(handle->multi); @@ -272,7 +272,7 @@ bool Curl_pipeline_server_blacklisted(struct SessionHandle *handle, } } - DEBUGF(infof(handle, "Server %s is not blacklisted\n", server_name)); + infof(handle, "Server %s is not blacklisted\n", server_name); } return FALSE; } diff --git a/lib/pop3.c b/lib/pop3.c index 6600459..314567e 100644 --- a/lib/pop3.c +++ b/lib/pop3.c @@ -27,7 +27,6 @@ * RFC2831 DIGEST-MD5 authentication * RFC4422 Simple Authentication and Security Layer (SASL) * RFC4616 PLAIN authentication - * RFC4752 The Kerberos V5 ("GSSAPI") SASL Mechanism * RFC5034 POP3 SASL Authentication Mechanism * RFC6749 OAuth 2.0 Authorization Framework * Draft LOGIN SASL Mechanism @@ -63,6 +62,7 @@ #include #include "urldata.h" #include "sendf.h" +#include "if2ip.h" #include "hostip.h" #include "progress.h" #include "transfer.h" @@ -320,9 +320,6 @@ static void state(struct connectdata *conn, pop3state newstate) "AUTH_DIGESTMD5_RESP", "AUTH_NTLM", "AUTH_NTLM_TYPE2MSG", - "AUTH_GSSAPI", - "AUTH_GSSAPI_TOKEN", - "AUTH_GSSAPI_NO_DATA", "AUTH_XOAUTH2", "AUTH_CANCEL", "AUTH_FINAL", @@ -559,6 +556,8 @@ static CURLcode pop3_perform_authentication(struct connectdata *conn) if(mech && (pop3c->preftype & POP3_TYPE_SASL)) { /* Perform SASL based authentication */ result = pop3_perform_auth(conn, mech, initresp, len, state1, state2); + + Curl_safefree(initresp); } #ifndef CURL_DISABLE_CRYPTO_AUTH else if((pop3c->authtypes & POP3_TYPE_APOP) && @@ -577,8 +576,6 @@ static CURLcode pop3_perform_authentication(struct connectdata *conn) } } - Curl_safefree(initresp); - return result; } @@ -1130,158 +1127,6 @@ static CURLcode pop3_state_auth_ntlm_type2msg_resp(struct connectdata *conn, } #endif -#if defined(USE_KERBEROS5) -/* For AUTH GSSAPI (without initial response) responses */ -static CURLcode pop3_state_auth_gssapi_resp(struct connectdata *conn, - int pop3code, - pop3state instate) -{ - CURLcode result = CURLE_OK; - struct SessionHandle *data = conn->data; - struct pop3_conn *pop3c = &conn->proto.pop3c; - size_t len = 0; - char *respmsg = NULL; - - (void)instate; /* no use for this yet */ - - if(pop3code != '+') { - failf(data, "Access denied: %d", pop3code); - result = CURLE_LOGIN_DENIED; - } - else { - /* Create the initial response message */ - result = Curl_sasl_create_gssapi_user_message(data, conn->user, - conn->passwd, "pop", - pop3c->mutual_auth, - NULL, &conn->krb5, - &respmsg, &len); - if(!result && respmsg) { - /* Send the message */ - result = Curl_pp_sendf(&pop3c->pp, "%s", respmsg); - - if(!result) - state(conn, POP3_AUTH_GSSAPI_TOKEN); - } - } - - Curl_safefree(respmsg); - - return result; -} - -/* For AUTH GSSAPI user token responses */ -static CURLcode pop3_state_auth_gssapi_token_resp(struct connectdata *conn, - int pop3code, - pop3state instate) -{ - CURLcode result = CURLE_OK; - struct SessionHandle *data = conn->data; - struct pop3_conn *pop3c = &conn->proto.pop3c; - char *chlgmsg = NULL; - char *respmsg = NULL; - size_t len = 0; - - (void)instate; /* no use for this yet */ - - if(pop3code != '+') { - failf(data, "Access denied: %d", pop3code); - result = CURLE_LOGIN_DENIED; - } - else { - /* Get the challenge message */ - pop3_get_message(data->state.buffer, &chlgmsg); - - if(pop3c->mutual_auth) - /* Decode the user token challenge and create the optional response - message */ - result = Curl_sasl_create_gssapi_user_message(data, NULL, NULL, NULL, - pop3c->mutual_auth, - chlgmsg, &conn->krb5, - &respmsg, &len); - else - /* Decode the security challenge and create the response message */ - result = Curl_sasl_create_gssapi_security_message(data, chlgmsg, - &conn->krb5, - &respmsg, &len); - - if(result) { - if(result == CURLE_BAD_CONTENT_ENCODING) { - /* Send the cancellation */ - result = Curl_pp_sendf(&pop3c->pp, "%s", "*"); - - if(!result) - state(conn, POP3_AUTH_CANCEL); - } - } - else { - /* Send the response */ - if(respmsg) - result = Curl_pp_sendf(&pop3c->pp, "%s", respmsg); - else - result = Curl_pp_sendf(&pop3c->pp, "%s", ""); - - if(!result) - state(conn, (pop3c->mutual_auth ? POP3_AUTH_GSSAPI_NO_DATA : - POP3_AUTH_FINAL)); - } - } - - Curl_safefree(respmsg); - - return result; -} - -/* For AUTH GSSAPI no data responses */ -static CURLcode pop3_state_auth_gssapi_no_data_resp(struct connectdata *conn, - int pop3code, - pop3state instate) -{ - CURLcode result = CURLE_OK; - struct SessionHandle *data = conn->data; - char *chlgmsg = NULL; - char *respmsg = NULL; - size_t len = 0; - - (void)instate; /* no use for this yet */ - - if(pop3code != '+') { - failf(data, "Access denied: %d", pop3code); - result = CURLE_LOGIN_DENIED; - } - else { - /* Get the challenge message */ - pop3_get_message(data->state.buffer, &chlgmsg); - - /* Decode the security challenge and create the security message */ - result = Curl_sasl_create_gssapi_security_message(data, chlgmsg, - &conn->krb5, - &respmsg, &len); - if(result) { - if(result == CURLE_BAD_CONTENT_ENCODING) { - /* Send the cancellation */ - result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", "*"); - - if(!result) - state(conn, POP3_AUTH_CANCEL); - } - } - else { - /* Send the response */ - if(respmsg) { - result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", respmsg); - - if(!result) - state(conn, POP3_AUTH_FINAL); - } - } - } - - Curl_safefree(respmsg); - - return result; -} -#endif - /* For AUTH XOAUTH2 (without initial response) responses */ static CURLcode pop3_state_auth_xoauth2_resp(struct connectdata *conn, int pop3code, pop3state instate) @@ -1590,21 +1435,6 @@ static CURLcode pop3_statemach_act(struct connectdata *conn) break; #endif -#if defined(USE_KERBEROS5) - case POP3_AUTH_GSSAPI: - result = pop3_state_auth_gssapi_resp(conn, pop3code, pop3c->state); - break; - - case POP3_AUTH_GSSAPI_TOKEN: - result = pop3_state_auth_gssapi_token_resp(conn, pop3code, pop3c->state); - break; - - case POP3_AUTH_GSSAPI_NO_DATA: - result = pop3_state_auth_gssapi_no_data_resp(conn, pop3code, - pop3c->state); - break; -#endif - case POP3_AUTH_XOAUTH2: result = pop3_state_auth_xoauth2_resp(conn, pop3code, pop3c->state); break; @@ -1934,8 +1764,8 @@ static CURLcode pop3_regular_transfer(struct connectdata *conn, /* Set the progress data */ Curl_pgrsSetUploadCounter(data, 0); Curl_pgrsSetDownloadCounter(data, 0); - Curl_pgrsSetUploadSize(data, -1); - Curl_pgrsSetDownloadSize(data, -1); + Curl_pgrsSetUploadSize(data, 0); + Curl_pgrsSetDownloadSize(data, 0); /* Carry out the perform */ result = pop3_perform(conn, &connected, dophase_done); @@ -2120,25 +1950,6 @@ static CURLcode pop3_calc_sasl_details(struct connectdata *conn, /* Calculate the supported authentication mechanism, by decreasing order of security, as well as the initial response where appropriate */ -#if defined(USE_KERBEROS5) - if((pop3c->authmechs & SASL_MECH_GSSAPI) && - (pop3c->prefmech & SASL_MECH_GSSAPI)) { - pop3c->mutual_auth = FALSE; /* TODO: Calculate mutual authentication */ - - *mech = SASL_MECH_STRING_GSSAPI; - *state1 = POP3_AUTH_GSSAPI; - *state2 = POP3_AUTH_GSSAPI_TOKEN; - pop3c->authused = SASL_MECH_GSSAPI; - - if(data->set.sasl_ir) - result = Curl_sasl_create_gssapi_user_message(data, conn->user, - conn->passwd, "pop", - pop3c->mutual_auth, - NULL, &conn->krb5, - initresp, len); - } - else -#endif #ifndef CURL_DISABLE_CRYPTO_AUTH if((pop3c->authmechs & SASL_MECH_DIGEST_MD5) && (pop3c->prefmech & SASL_MECH_DIGEST_MD5)) { diff --git a/lib/pop3.h b/lib/pop3.h index 729a55a..fcc8395 100644 --- a/lib/pop3.h +++ b/lib/pop3.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2009 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 2009 - 2013, Daniel Stenberg, , 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,9 +43,6 @@ typedef enum { POP3_AUTH_DIGESTMD5_RESP, POP3_AUTH_NTLM, POP3_AUTH_NTLM_TYPE2MSG, - POP3_AUTH_GSSAPI, - POP3_AUTH_GSSAPI_TOKEN, - POP3_AUTH_GSSAPI_NO_DATA, POP3_AUTH_XOAUTH2, POP3_AUTH_CANCEL, POP3_AUTH_FINAL, @@ -84,7 +81,6 @@ struct pop3_conn { unsigned int authused; /* SASL auth mechanism used for the connection */ char *apoptimestamp; /* APOP timestamp from the server greeting */ bool tls_supported; /* StartTLS capability supported by server */ - bool mutual_auth; /* Mutual authentication enabled (GSSAPI only) */ }; extern const struct Curl_handler Curl_handler_pop3; diff --git a/lib/progress.c b/lib/progress.c index f147ce7..e6a8d82 100644 --- a/lib/progress.c +++ b/lib/progress.c @@ -159,8 +159,8 @@ void Curl_pgrsResetTimesSizes(struct SessionHandle *data) data->progress.t_pretransfer = 0.0; data->progress.t_starttransfer = 0.0; - Curl_pgrsSetDownloadSize(data, -1); - Curl_pgrsSetUploadSize(data, -1); + Curl_pgrsSetDownloadSize(data, 0); + Curl_pgrsSetUploadSize(data, 0); } void Curl_pgrsTime(struct SessionHandle *data, timerid timer) @@ -234,26 +234,20 @@ void Curl_pgrsSetUploadCounter(struct SessionHandle *data, curl_off_t size) void Curl_pgrsSetDownloadSize(struct SessionHandle *data, curl_off_t size) { - if(size >= 0) { - data->progress.size_dl = size; + data->progress.size_dl = size; + if(size >= 0) data->progress.flags |= PGRS_DL_SIZE_KNOWN; - } - else { - data->progress.size_dl = 0; + else data->progress.flags &= ~PGRS_DL_SIZE_KNOWN; - } } void Curl_pgrsSetUploadSize(struct SessionHandle *data, curl_off_t size) { - if(size >= 0) { - data->progress.size_ul = size; + data->progress.size_ul = size; + if(size >= 0) data->progress.flags |= PGRS_UL_SIZE_KNOWN; - } - else { - data->progress.size_ul = 0; + else data->progress.flags &= ~PGRS_UL_SIZE_KNOWN; - } } /* diff --git a/lib/security.c b/lib/security.c index 607048c..508c7b4 100644 --- a/lib/security.c +++ b/lib/security.c @@ -10,7 +10,7 @@ * Copyright (c) 1998, 1999, 2013 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * - * Copyright (C) 2001 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 2001 - 2013, Daniel Stenberg, , et al. * * All rights reserved. * @@ -129,11 +129,11 @@ static int ftp_send_command(struct connectdata *conn, const char *message, ...) vsnprintf(print_buffer, sizeof(print_buffer), message, args); va_end(args); - if(Curl_ftpsendf(conn, print_buffer)) { + if(Curl_ftpsendf(conn, print_buffer) != CURLE_OK) { ftp_code = -1; } else { - if(Curl_GetFTPResponse(&nread, conn, &ftp_code)) + if(Curl_GetFTPResponse(&nread, conn, &ftp_code) != CURLE_OK) ftp_code = -1; } @@ -147,20 +147,20 @@ static CURLcode socket_read(curl_socket_t fd, void *to, size_t len) { char *to_p = to; - CURLcode result; + CURLcode code; ssize_t nread; while(len > 0) { - result = Curl_read_plain(fd, to_p, len, &nread); - if(!result) { + code = Curl_read_plain(fd, to_p, len, &nread); + if(code == CURLE_OK) { len -= nread; to_p += nread; } else { /* FIXME: We are doing a busy wait */ - if(result == CURLE_AGAIN) + if(code == CURLE_AGAIN) continue; - return result; + return code; } } return CURLE_OK; @@ -175,20 +175,20 @@ socket_write(struct connectdata *conn, curl_socket_t fd, const void *to, size_t len) { const char *to_p = to; - CURLcode result; + CURLcode code; ssize_t written; while(len > 0) { - result = Curl_write_plain(conn, fd, to_p, len, &written); - if(!result) { + code = Curl_write_plain(conn, fd, to_p, len, &written); + if(code == CURLE_OK) { len -= written; to_p += written; } else { /* FIXME: We are doing a busy wait */ - if(result == CURLE_AGAIN) + if(code == CURLE_AGAIN) continue; - return result; + return code; } } return CURLE_OK; @@ -200,11 +200,11 @@ static CURLcode read_data(struct connectdata *conn, { int len; void* tmp; - CURLcode result; + CURLcode ret; - result = socket_read(fd, &len, sizeof(len)); - if(result) - return result; + ret = socket_read(fd, &len, sizeof(len)); + if(ret != CURLE_OK) + return ret; len = ntohl(len); tmp = realloc(buf->data, len); @@ -212,9 +212,9 @@ static CURLcode read_data(struct connectdata *conn, return CURLE_OUT_OF_MEMORY; buf->data = tmp; - result = socket_read(fd, buf->data, len); - if(result) - return result; + ret = socket_read(fd, buf->data, len); + if(ret != CURLE_OK) + return ret; buf->size = conn->mech->decode(conn->app_data, buf->data, len, conn->data_prot, conn); buf->index = 0; @@ -256,7 +256,7 @@ static ssize_t sec_recv(struct connectdata *conn, int sockindex, buffer += bytes_read; while(len > 0) { - if(read_data(conn, fd, &conn->in_buffer)) + if(read_data(conn, fd, &conn->in_buffer) != CURLE_OK) return -1; if(conn->in_buffer.size == 0) { if(bytes_read > 0) @@ -295,7 +295,7 @@ static void do_sec_send(struct connectdata *conn, curl_socket_t fd, prot_level = conn->command_prot; } bytes = conn->mech->encode(conn->app_data, from, length, prot_level, - (void**)&buffer); + (void**)&buffer, conn); if(!buffer || bytes <= 0) return; /* error */ @@ -332,6 +332,7 @@ static void do_sec_send(struct connectdata *conn, curl_socket_t fd, static ssize_t sec_write(struct connectdata *conn, curl_socket_t fd, const char *buffer, size_t length) { + /* FIXME: Check for overflow */ ssize_t tx = 0, len = conn->buffer_size; len -= conn->mech->overhead(conn->app_data, conn->data_prot, @@ -339,9 +340,10 @@ static ssize_t sec_write(struct connectdata *conn, curl_socket_t fd, if(len <= 0) len = length; while(length) { - if(length < (size_t)len) + if(len >= 0 || length < (size_t)len) { + /* FIXME: Check for overflow. */ len = length; - + } do_sec_send(conn, fd, buffer, curlx_sztosi(len)); length -= len; buffer += len; @@ -400,7 +402,7 @@ int Curl_sec_read_msg(struct connectdata *conn, char *buffer, ret_code = 0; else { /* Check for error? */ - (void)sscanf(buf, "%d", &ret_code); + sscanf(buf, "%d", &ret_code); } if(buf[decoded_len - 1] == '\n') @@ -562,7 +564,7 @@ static CURLcode choose_mech(struct connectdata *conn) break; } - return *mech != NULL ? CURLE_OK : CURLE_FAILED_INIT; + return mech != NULL ? CURLE_OK : CURLE_FAILED_INIT; } CURLcode diff --git a/lib/select.c b/lib/select.c index 1c6481c..da3082d 100644 --- a/lib/select.c +++ b/lib/select.c @@ -39,10 +39,6 @@ #include /* delay() */ #endif -#ifdef __VXWORKS__ -#include /* bzero() in FD_SET */ -#endif - #include #include "urldata.h" @@ -112,10 +108,8 @@ int Curl_wait_ms(int timeout_ms) if(error && error_not_EINTR) break; pending_ms = timeout_ms - elapsed_ms; - if(pending_ms <= 0) { - r = 0; /* Simulate a "call timed out" case */ + if(pending_ms <= 0) break; - } } while(r == -1); #endif /* USE_WINSOCK */ if(r) @@ -438,10 +432,8 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms) break; if(timeout_ms > 0) { pending_ms = timeout_ms - elapsed_ms; - if(pending_ms <= 0) { - r = 0; /* Simulate a "call timed out" case */ + if(pending_ms <= 0) break; - } } } while(r == -1); @@ -525,10 +517,8 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms) break; if(timeout_ms > 0) { pending_ms = timeout_ms - elapsed_ms; - if(pending_ms <= 0) { - r = 0; /* Simulate a "call timed out" case */ + if(pending_ms <= 0) break; - } } } while(r == -1); diff --git a/lib/sendf.c b/lib/sendf.c index 2d1a166..4a87c79 100644 --- a/lib/sendf.c +++ b/lib/sendf.c @@ -174,7 +174,7 @@ CURLcode Curl_sendf(curl_socket_t sockfd, struct connectdata *conn, struct SessionHandle *data = conn->data; ssize_t bytes_written; size_t write_len; - CURLcode result = CURLE_OK; + CURLcode res = CURLE_OK; char *s; char *sptr; va_list ap; @@ -190,9 +190,9 @@ CURLcode Curl_sendf(curl_socket_t sockfd, struct connectdata *conn, for(;;) { /* Write the buffer to the socket */ - result = Curl_write(conn, sockfd, sptr, write_len, &bytes_written); + res = Curl_write(conn, sockfd, sptr, write_len, &bytes_written); - if(result) + if(CURLE_OK != res) break; if(data->set.verbose) @@ -210,7 +210,7 @@ CURLcode Curl_sendf(curl_socket_t sockfd, struct connectdata *conn, free(s); /* free the output string */ - return result; + return res; } /* @@ -227,10 +227,10 @@ CURLcode Curl_write(struct connectdata *conn, ssize_t *written) { ssize_t bytes_written; - CURLcode result = CURLE_OK; + CURLcode curlcode = CURLE_OK; int num = (sockfd == conn->sock[SECONDARYSOCKET]); - bytes_written = conn->send[num](conn, num, mem, len, &result); + bytes_written = conn->send[num](conn, num, mem, len, &curlcode); *written = bytes_written; if(bytes_written >= 0) @@ -238,7 +238,7 @@ CURLcode Curl_write(struct connectdata *conn, return CURLE_OK; /* handle CURLE_AGAIN or a send failure */ - switch(result) { + switch(curlcode) { case CURLE_AGAIN: *written = 0; return CURLE_OK; @@ -249,7 +249,7 @@ CURLcode Curl_write(struct connectdata *conn, default: /* we got a specific curlcode, forward it */ - return result; + return curlcode; } } @@ -300,14 +300,14 @@ CURLcode Curl_write_plain(struct connectdata *conn, ssize_t *written) { ssize_t bytes_written; - CURLcode result; + CURLcode retcode; int num = (sockfd == conn->sock[SECONDARYSOCKET]); - bytes_written = Curl_send_plain(conn, num, mem, len, &result); + bytes_written = Curl_send_plain(conn, num, mem, len, &retcode); *written = bytes_written; - return result; + return retcode; } ssize_t Curl_recv_plain(struct connectdata *conn, int num, char *buf, @@ -374,21 +374,25 @@ static CURLcode pausewrite(struct SessionHandle *data, } -/* 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. +/* Curl_client_write() sends data to the write callback(s) + + The bit pattern defines to what "streams" to write to. Body and/or header. + The defines are in sendf.h of course. + + If CURL_DO_LINEEND_CONV is enabled, data is converted IN PLACE to the + local character encoding. This is a problem and should be changed in + the future to leave the original data alone. */ -CURLcode Curl_client_chop_write(struct connectdata *conn, - int type, - char * ptr, - size_t len) +CURLcode Curl_client_write(struct connectdata *conn, + int type, + char *ptr, + size_t len) { struct SessionHandle *data = conn->data; - curl_write_callback writeheader = NULL; - curl_write_callback writebody = NULL; + size_t wrote; - if(!len) - return CURLE_OK; + if(0 == len) + len = strlen(ptr); /* 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 @@ -413,105 +417,76 @@ CURLcode Curl_client_chop_write(struct connectdata *conn, /* update the pointer and the size */ data->state.tempwrite = newptr; data->state.tempwritesize = newlen; - return CURLE_OK; - } - /* Determine the callback(s) to use. */ - if(type & CLIENTWRITE_BODY) - writebody = data->set.fwrite_func; - if((type & CLIENTWRITE_HEADER) && - (data->set.fwrite_header || data->set.writeheader)) { - /* - * Write headers to the same callback or to the especially setup - * header callback function (added after version 7.7.1). - */ - writeheader = - data->set.fwrite_header? data->set.fwrite_header: data->set.fwrite_func; + return CURLE_OK; } - /* Chop data, write chunks. */ - while(len) { - size_t chunklen = len <= CURL_MAX_WRITE_SIZE? len: CURL_MAX_WRITE_SIZE; - - if(writebody) { - size_t wrote = writebody(ptr, 1, chunklen, data->set.out); + if(type & CLIENTWRITE_BODY) { + if((conn->handler->protocol&PROTO_FAMILY_FTP) && + conn->proto.ftpc.transfertype == 'A') { + /* convert from the network encoding */ + CURLcode rc = Curl_convert_from_network(data, ptr, len); + /* Curl_convert_from_network calls failf if unsuccessful */ + if(rc) + return rc; - if(CURL_WRITEFUNC_PAUSE == wrote) { - if(conn->handler->flags & PROTOPT_NONETWORK) { - /* Protocols that work without network cannot be paused. This is - actually only FILE:// just now, and it can't pause since the - transfer isn't done using the "normal" procedure. */ - 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; - } +#ifdef CURL_DO_LINEEND_CONV + /* convert end-of-line markers */ + len = convert_lineends(data, ptr, len); +#endif /* CURL_DO_LINEEND_CONV */ + } + /* If the previous block of data ended with CR and this block of data is + just a NL, then the length might be zero */ + if(len) { + wrote = data->set.fwrite_func(ptr, 1, len, data->set.out); + } + else { + wrote = 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"); + if(CURL_WRITEFUNC_PAUSE == wrote) { + if(conn->handler->flags & PROTOPT_NONETWORK) { + /* Protocols that work without network cannot be paused. This is + actually only FILE:// just now, and it can't pause since the + transfer isn't done using the "normal" procedure. */ + failf(data, "Write callback asked for PAUSE when not supported!"); return CURLE_WRITE_ERROR; } + else + return pausewrite(data, type, ptr, len); + } + else if(wrote != len) { + failf(data, "Failed writing body (%zu != %zu)", wrote, len); + return CURLE_WRITE_ERROR; } - - ptr += chunklen; - len -= chunklen; } - return CURLE_OK; -} - - -/* Curl_client_write() sends data to the write callback(s) - - The bit pattern defines to what "streams" to write to. Body and/or header. - The defines are in sendf.h of course. - - If CURL_DO_LINEEND_CONV is enabled, data is converted IN PLACE to the - local character encoding. This is a problem and should be changed in - the future to leave the original data alone. - */ -CURLcode Curl_client_write(struct connectdata *conn, - int type, - char *ptr, - size_t len) -{ - struct SessionHandle *data = conn->data; - - if(0 == len) - len = strlen(ptr); - - /* FTP data may need conversion. */ - if((type & CLIENTWRITE_BODY) && - (conn->handler->protocol & PROTO_FAMILY_FTP) && - conn->proto.ftpc.transfertype == 'A') { - /* convert from the network encoding */ - CURLcode result = Curl_convert_from_network(data, ptr, len); - /* Curl_convert_from_network calls failf if unsuccessful */ - if(result) - return result; - -#ifdef CURL_DO_LINEEND_CONV - /* convert end-of-line markers */ - len = convert_lineends(data, ptr, len); -#endif /* CURL_DO_LINEEND_CONV */ + if((type & CLIENTWRITE_HEADER) && + (data->set.fwrite_header || data->set.writeheader) ) { + /* + * Write headers to the same callback or to the especially setup + * header callback function (added after version 7.7.1). + */ + curl_write_callback writeit= + data->set.fwrite_header?data->set.fwrite_header:data->set.fwrite_func; + + /* Note: The header is in the host encoding + regardless of the ftp transfer mode (ASCII/Image) */ + + wrote = writeit(ptr, 1, len, 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 != len) { + failf (data, "Failed writing header"); + return CURLE_WRITE_ERROR; } + } - return Curl_client_chop_write(conn, type, ptr, len); + return CURLE_OK; } CURLcode Curl_read_plain(curl_socket_t sockfd, @@ -550,7 +525,7 @@ CURLcode Curl_read(struct connectdata *conn, /* connection data */ size_t sizerequested, /* max amount to read */ ssize_t *n) /* amount bytes read */ { - CURLcode result = CURLE_RECV_ERROR; + CURLcode curlcode = CURLE_RECV_ERROR; ssize_t nread = 0; size_t bytesfromsocket = 0; char *buffertofill = NULL; @@ -589,9 +564,9 @@ CURLcode Curl_read(struct connectdata *conn, /* connection data */ buffertofill = buf; } - nread = conn->recv[num](conn, num, buffertofill, bytesfromsocket, &result); + nread = conn->recv[num](conn, num, buffertofill, bytesfromsocket, &curlcode); if(nread < 0) - return result; + return curlcode; if(pipelining) { memcpy(buf, conn->master_buffer, nread); @@ -686,13 +661,11 @@ int Curl_debug(struct SessionHandle *data, curl_infotype type, switch (type) { case CURLINFO_HEADER_IN: w = "Header"; - /* FALLTHROUGH */ case CURLINFO_DATA_IN: t = "from"; break; case CURLINFO_HEADER_OUT: w = "Header"; - /* FALLTHROUGH */ case CURLINFO_DATA_OUT: t = "to"; break; diff --git a/lib/sendf.h b/lib/sendf.h index 86f06cf..39489e4 100644 --- a/lib/sendf.h +++ b/lib/sendf.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2011, Daniel Stenberg, , 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,10 +51,8 @@ void Curl_failf(struct SessionHandle *, 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; + size_t len); /* internal read-function, does plain socket only */ CURLcode Curl_read_plain(curl_socket_t sockfd, diff --git a/lib/setup-os400.h b/lib/setup-os400.h index fae8567..0331464 100644 --- a/lib/setup-os400.h +++ b/lib/setup-os400.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , 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,6 +37,7 @@ typedef unsigned long u_int32_t; #include #include +#include #include #include #include @@ -56,6 +57,21 @@ extern int Curl_getnameinfo_a(const struct sockaddr * sa, #define getnameinfo Curl_getnameinfo_a +/* SSL wrappers. */ + +extern int Curl_SSL_Init_Application_a(SSLInitApp * init_app); +#define SSL_Init_Application Curl_SSL_Init_Application_a + + +extern int Curl_SSL_Init_a(SSLInit * init); +#define SSL_Init Curl_SSL_Init_a + + +extern char * Curl_SSL_Strerror_a(int sslreturnvalue, + SSLErrorMsg * serrmsgp); +#define SSL_Strerror Curl_SSL_Strerror_a + + /* GSKit wrappers. */ extern int Curl_gsk_environment_open(gsk_handle * my_env_handle); diff --git a/lib/setup-vms.h b/lib/setup-vms.h index 4b3dded..f5eedf7 100644 --- a/lib/setup-vms.h +++ b/lib/setup-vms.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -203,19 +203,6 @@ char * unix_path; #define CRYPTO_cleanup_all_ex_data CRYPTO_CLEANUP_ALL_EX_DATA #define CRYPTO_free CRYPTO_FREE #define CRYPTO_malloc CRYPTO_MALLOC -#define CONF_modules_load_file CONF_MODULES_LOAD_FILE -#ifdef __VAX -# ifdef VMS_OLD_SSL - /* Ancient OpenSSL on VAX/VMS missing this constant */ -# define CONF_MFLAGS_IGNORE_MISSING_FILE 0x10 -# undef CONF_modules_load_file - static int CONF_modules_load_file(const char *filename, - const char *appname, - unsigned long flags) { - return 1; - } -# endif -#endif #define DES_ecb_encrypt DES_ECB_ENCRYPT #define DES_set_key DES_SET_KEY #define DES_set_odd_parity DES_SET_ODD_PARITY @@ -241,7 +228,6 @@ char * unix_path; #define EVP_PKEY_free EVP_PKEY_FREE #define EVP_cleanup EVP_CLEANUP #define GENERAL_NAMES_free GENERAL_NAMES_FREE -#define i2d_X509_PUBKEY I2D_X509_PUBKEY #define MD4_Final MD4_FINAL #define MD4_Init MD4_INIT #define MD4_Update MD4_UPDATE @@ -288,7 +274,6 @@ char * unix_path; #define SSL_get_peer_cert_chain SSL_GET_PEER_CERT_CHAIN #define SSL_get_peer_certificate SSL_GET_PEER_CERTIFICATE #define SSL_get_privatekey SSL_GET_PRIVATEKEY -#define SSL_get_session SSL_GET_SESSION #define SSL_get_shutdown SSL_GET_SHUTDOWN #define SSL_get_verify_result SSL_GET_VERIFY_RESULT #define SSL_library_init SSL_LIBRARY_INIT @@ -306,23 +291,7 @@ char * unix_path; #define SSLv23_client_method SSLV23_CLIENT_METHOD #define SSLv3_client_method SSLV3_CLIENT_METHOD #define TLSv1_client_method TLSV1_CLIENT_METHOD -#define UI_create_method UI_CREATE_METHOD -#define UI_destroy_method UI_DESTROY_METHOD -#define UI_get0_user_data UI_GET0_USER_DATA -#define UI_get_input_flags UI_GET_INPUT_FLAGS -#define UI_get_string_type UI_GET_STRING_TYPE -#define UI_create_method UI_CREATE_METHOD -#define UI_destroy_method UI_DESTROY_METHOD -#define UI_method_get_closer UI_METHOD_GET_CLOSER -#define UI_method_get_opener UI_METHOD_GET_OPENER -#define UI_method_get_reader UI_METHOD_GET_READER -#define UI_method_get_writer UI_METHOD_GET_WRITER -#define UI_method_set_closer UI_METHOD_SET_CLOSER -#define UI_method_set_opener UI_METHOD_SET_OPENER -#define UI_method_set_reader UI_METHOD_SET_READER -#define UI_method_set_writer UI_METHOD_SET_WRITER #define UI_OpenSSL UI_OPENSSL -#define UI_set_result UI_SET_RESULT #define X509V3_EXT_print X509V3_EXT_PRINT #define X509_EXTENSION_get_critical X509_EXTENSION_GET_CRITICAL #define X509_EXTENSION_get_object X509_EXTENSION_GET_OBJECT diff --git a/lib/smb.c b/lib/smb.c deleted file mode 100644 index 3fadecd..0000000 --- a/lib/smb.c +++ /dev/null @@ -1,976 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2014, Bill Nagel , Exacq Technologies - * Copyright (C) 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 http://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" - -#if !defined(CURL_DISABLE_SMB) && defined(USE_NTLM) && \ - (CURL_SIZEOF_CURL_OFF_T > 4) - -#if !defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO) - -#define BUILDING_CURL_SMB_C - -#ifdef HAVE_PROCESS_H -#include -#define getpid _getpid -#endif - -#include "smb.h" -#include "urldata.h" -#include "sendf.h" -#include "multiif.h" -#include "connect.h" -#include "progress.h" -#include "transfer.h" -#include "vtls/vtls.h" -#include "curl_ntlm_core.h" -#include "curl_memory.h" -#include "escape.h" -#include "curl_endian.h" - -/* The last #include file should be: */ -#include "memdebug.h" - -/* Local API functions */ -static CURLcode smb_setup_connection(struct connectdata *conn); -static CURLcode smb_connect(struct connectdata *conn, bool *done); -static CURLcode smb_connection_state(struct connectdata *conn, bool *done); -static CURLcode smb_request_state(struct connectdata *conn, bool *done); -static CURLcode smb_done(struct connectdata *conn, CURLcode status, - bool premature); -static CURLcode smb_disconnect(struct connectdata *conn, bool dead); -static int smb_getsock(struct connectdata *conn, curl_socket_t *socks, - int numsocks); -static CURLcode smb_parse_url_path(struct connectdata *conn); - -/* - * SMB handler interface - */ -const struct Curl_handler Curl_handler_smb = { - "SMB", /* scheme */ - smb_setup_connection, /* setup_connection */ - ZERO_NULL, /* do_it */ - smb_done, /* done */ - ZERO_NULL, /* do_more */ - smb_connect, /* connect_it */ - smb_connection_state, /* connecting */ - smb_request_state, /* doing */ - smb_getsock, /* proto_getsock */ - smb_getsock, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - smb_disconnect, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_SMB, /* defport */ - CURLPROTO_SMB, /* protocol */ - PROTOPT_NONE /* flags */ -}; - -#ifdef USE_SSL -/* - * SMBS handler interface - */ -const struct Curl_handler Curl_handler_smbs = { - "SMBS", /* scheme */ - smb_setup_connection, /* setup_connection */ - ZERO_NULL, /* do_it */ - smb_done, /* done */ - ZERO_NULL, /* do_more */ - smb_connect, /* connect_it */ - smb_connection_state, /* connecting */ - smb_request_state, /* doing */ - smb_getsock, /* proto_getsock */ - smb_getsock, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - smb_disconnect, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_SMBS, /* defport */ - CURLPROTO_SMBS, /* protocol */ - PROTOPT_SSL /* flags */ -}; -#endif - -#define MAX_PAYLOAD_SIZE 0x8000 -#define MAX_MESSAGE_SIZE (MAX_PAYLOAD_SIZE + 0x1000) -#define CLIENTNAME "curl" -#define SERVICENAME "?????" - -/* Append a string to an SMB message */ -#define MSGCAT(str) \ - strcpy(p, (str)); \ - p += strlen(str); - -/* Append a null-terminated string to an SMB message */ -#define MSGCATNULL(str) \ - strcpy(p, (str)); \ - p += strlen(str) + 1; - -/* SMB is mostly little endian */ -#if (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) || \ - defined(__OS400__) -static unsigned short smb_swap16(unsigned short x) -{ - return (x << 8) | ((x >> 8) & 0xff); -} - -static unsigned int smb_swap32(unsigned int x) -{ - return (x << 24) | ((x << 8) & 0xff0000) | ((x >> 8) & 0xff00) | - ((x >> 24) & 0xff); -} - -#ifdef HAVE_LONGLONG -static unsigned long long smb_swap64(unsigned long long x) -{ - return ((unsigned long long)smb_swap32(x) << 32) | smb_swap32(x >> 32); -} -#else -static unsigned __int64 smb_swap64(unsigned __int64 x) -{ - return ((unsigned __int64)smb_swap32(x) << 32) | smb_swap32(x >> 32); -} -#endif -#else -# define smb_swap16(x) (x) -# define smb_swap32(x) (x) -# define smb_swap64(x) (x) -#endif - -/* SMB request state */ -enum smb_req_state { - SMB_REQUESTING, - SMB_TREE_CONNECT, - SMB_OPEN, - SMB_DOWNLOAD, - SMB_UPLOAD, - SMB_CLOSE, - SMB_TREE_DISCONNECT, - SMB_DONE -}; - -/* SMB request data */ -struct smb_request { - enum smb_req_state state; - char *share; - char *path; - unsigned short tid; /* Even if we connect to the same tree as another */ - unsigned short fid; /* request, the tid will be different */ - CURLcode result; -}; - -static void conn_state(struct connectdata *conn, enum smb_conn_state newstate) -{ - struct smb_conn *smb = &conn->proto.smbc; -#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS) - /* For debug purposes */ - static const char * const names[] = { - "SMB_NOT_CONNECTED", - "SMB_CONNECTING", - "SMB_NEGOTIATE", - "SMB_SETUP", - "SMB_CONNECTED", - /* LAST */ - }; - - if(smb->state != newstate) - infof(conn->data, "SMB conn %p state change from %s to %s\n", - (void *)smb, names[smb->state], names[newstate]); -#endif - - smb->state = newstate; -} - -static void request_state(struct connectdata *conn, - enum smb_req_state newstate) -{ - struct smb_request *req = conn->data->req.protop; -#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS) - /* For debug purposes */ - static const char * const names[] = { - "SMB_REQUESTING", - "SMB_TREE_CONNECT", - "SMB_OPEN", - "SMB_DOWNLOAD", - "SMB_UPLOAD", - "SMB_CLOSE", - "SMB_TREE_DISCONNECT", - "SMB_DONE", - /* LAST */ - }; - - if(req->state != newstate) - infof(conn->data, "SMB request %p state change from %s to %s\n", - (void *)req, names[req->state], names[newstate]); -#endif - - req->state = newstate; -} - -static CURLcode smb_setup_connection(struct connectdata *conn) -{ - struct smb_request *req; - - /* Initialize the request state */ - conn->data->req.protop = req = calloc(1, sizeof(struct smb_request)); - if(!req) - return CURLE_OUT_OF_MEMORY; - - /* Parse the URL path */ - return smb_parse_url_path(conn); -} - -static CURLcode smb_connect(struct connectdata *conn, bool *done) -{ - struct smb_conn *smbc = &conn->proto.smbc; - char *slash; - - (void) done; - - /* Check we have a username and password to authenticate with */ - if(!conn->bits.user_passwd) - return CURLE_LOGIN_DENIED; - - /* Initialize the connection state */ - memset(smbc, 0, sizeof(*smbc)); - smbc->state = SMB_CONNECTING; - smbc->recv_buf = malloc(MAX_MESSAGE_SIZE); - if(!smbc->recv_buf) - return CURLE_OUT_OF_MEMORY; - - /* Multiple requests are allowed with this connection */ - connkeep(conn, "SMB default"); - - /* Parse the username, domain, and password */ - slash = strchr(conn->user, '/'); - if(!slash) - slash = strchr(conn->user, '\\'); - - if(slash) { - smbc->user = slash + 1; - smbc->domain = strdup(conn->user); - if(!smbc->domain) - return CURLE_OUT_OF_MEMORY; - smbc->domain[slash - conn->user] = 0; - } - else { - smbc->user = conn->user; - smbc->domain = strdup(conn->host.name); - if(!smbc->domain) - return CURLE_OUT_OF_MEMORY; - } - - return CURLE_OK; -} - -static CURLcode smb_recv_message(struct connectdata *conn, void **msg) -{ - struct smb_conn *smbc = &conn->proto.smbc; - char *buf = smbc->recv_buf; - ssize_t bytes_read; - size_t nbt_size; - size_t msg_size; - size_t len = MAX_MESSAGE_SIZE - smbc->got; - CURLcode result; - - result = Curl_read(conn, FIRSTSOCKET, buf + smbc->got, len, &bytes_read); - if(result) - return result; - - if(!bytes_read) - return CURLE_OK; - - smbc->got += bytes_read; - - /* Check for a 32-bit nbt header */ - if(smbc->got < sizeof(unsigned int)) - return CURLE_OK; - - nbt_size = Curl_read16_be((unsigned char *)(buf + sizeof(unsigned short))) + - sizeof(unsigned int); - if(smbc->got < nbt_size) - return CURLE_OK; - - msg_size = sizeof(struct smb_header); - if(nbt_size >= msg_size + 1) { - /* Add the word count */ - msg_size += 1 + ((unsigned char) buf[msg_size]) * sizeof(unsigned short); - if(nbt_size >= msg_size + sizeof(unsigned short)) { - /* Add the byte count */ - msg_size += sizeof(unsigned short) + - Curl_read16_le((unsigned char *)&buf[msg_size]); - if(nbt_size < msg_size) - return CURLE_READ_ERROR; - } - } - - *msg = buf; - - return CURLE_OK; -} - -static void smb_pop_message(struct connectdata *conn) -{ - struct smb_conn *smbc = &conn->proto.smbc; - - smbc->got = 0; -} - -static void smb_format_message(struct connectdata *conn, struct smb_header *h, - unsigned char cmd, size_t len) -{ - struct smb_conn *smbc = &conn->proto.smbc; - struct smb_request *req = conn->data->req.protop; - unsigned int pid; - - memset(h, 0, sizeof(*h)); - h->nbt_length = htons((unsigned short) (sizeof(*h) - sizeof(unsigned int) + - len)); - memcpy((char *)h->magic, "\xffSMB", 4); - h->command = cmd; - h->flags = SMB_FLAGS_CANONICAL_PATHNAMES | SMB_FLAGS_CASELESS_PATHNAMES; - h->flags2 = smb_swap16(SMB_FLAGS2_IS_LONG_NAME | SMB_FLAGS2_KNOWS_LONG_NAME); - h->uid = smb_swap16(smbc->uid); - h->tid = smb_swap16(req->tid); - pid = getpid(); - h->pid_high = smb_swap16((unsigned short)(pid >> 16)); - h->pid = smb_swap16((unsigned short) pid); -} - -static CURLcode smb_send(struct connectdata *conn, ssize_t len, - size_t upload_size) -{ - struct smb_conn *smbc = &conn->proto.smbc; - ssize_t bytes_written; - CURLcode result; - - result = Curl_write(conn, FIRSTSOCKET, conn->data->state.uploadbuffer, - len, &bytes_written); - if(result) - return result; - - if(bytes_written != len) { - smbc->send_size = len; - smbc->sent = bytes_written; - } - - smbc->upload_size = upload_size; - - return CURLE_OK; -} - -static CURLcode smb_flush(struct connectdata *conn) -{ - struct smb_conn *smbc = &conn->proto.smbc; - ssize_t bytes_written; - ssize_t len = smbc->send_size - smbc->sent; - CURLcode result; - - if(!smbc->send_size) - return CURLE_OK; - - result = Curl_write(conn, FIRSTSOCKET, - conn->data->state.uploadbuffer + smbc->sent, - len, &bytes_written); - if(result) - return result; - - if(bytes_written != len) - smbc->sent += bytes_written; - else - smbc->send_size = 0; - - return CURLE_OK; -} - -static CURLcode smb_send_message(struct connectdata *conn, unsigned char cmd, - const void *msg, size_t msg_len) -{ - smb_format_message(conn, (struct smb_header *)conn->data->state.uploadbuffer, - cmd, msg_len); - memcpy(conn->data->state.uploadbuffer + sizeof(struct smb_header), - msg, msg_len); - - return smb_send(conn, sizeof(struct smb_header) + msg_len, 0); -} - -static CURLcode smb_send_negotiate(struct connectdata *conn) -{ - const char *msg = "\x00\x0c\x00\x02NT LM 0.12"; - - return smb_send_message(conn, SMB_COM_NEGOTIATE, msg, 15); -} - -static CURLcode smb_send_setup(struct connectdata *conn) -{ - struct smb_conn *smbc = &conn->proto.smbc; - struct smb_setup msg; - char *p = msg.bytes; - unsigned char lm_hash[21]; - unsigned char lm[24]; - unsigned char nt_hash[21]; - unsigned char nt[24]; - - size_t byte_count = sizeof(lm) + sizeof(nt); - byte_count += strlen(smbc->user) + strlen(smbc->domain); - byte_count += strlen(OS) + strlen(CLIENTNAME) + 4; /* 4 null chars */ - if(byte_count > sizeof(msg.bytes)) - return CURLE_FILESIZE_EXCEEDED; - - 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 - Curl_ntlm_core_mk_nt_hash(conn->data, conn->passwd, nt_hash); - Curl_ntlm_core_lm_resp(nt_hash, smbc->challenge, nt); -#else - memset(nt, 0, sizeof(nt)); -#endif - - memset(&msg, 0, sizeof(msg)); - msg.word_count = SMB_WC_SETUP_ANDX; - msg.andx.command = SMB_COM_NO_ANDX_COMMAND; - msg.max_buffer_size = smb_swap16(MAX_MESSAGE_SIZE); - msg.max_mpx_count = smb_swap16(1); - msg.vc_number = smb_swap16(1); - msg.session_key = smb_swap32(smbc->session_key); - msg.capabilities = smb_swap32(SMB_CAP_LARGE_FILES); - msg.lengths[0] = smb_swap16(sizeof(lm)); - msg.lengths[1] = smb_swap16(sizeof(nt)); - memcpy(p, lm, sizeof(lm)); - p += sizeof(lm); - memcpy(p, nt, sizeof(nt)); - p += sizeof(nt); - MSGCATNULL(smbc->user); - MSGCATNULL(smbc->domain); - MSGCATNULL(OS); - MSGCATNULL(CLIENTNAME); - byte_count = p - msg.bytes; - msg.byte_count = smb_swap16((unsigned short)byte_count); - - return smb_send_message(conn, SMB_COM_SETUP_ANDX, &msg, - sizeof(msg) - sizeof(msg.bytes) + byte_count); -} - -static CURLcode smb_send_tree_connect(struct connectdata *conn) -{ - struct smb_request *req = conn->data->req.protop; - struct smb_tree_connect msg; - char *p = msg.bytes; - - size_t byte_count = strlen(conn->host.name) + strlen(req->share); - byte_count += strlen(SERVICENAME) + 5; /* 2 nulls and 3 backslashes */ - if(byte_count > sizeof(msg.bytes)) - return CURLE_FILESIZE_EXCEEDED; - - memset(&msg, 0, sizeof(msg)); - msg.word_count = SMB_WC_TREE_CONNECT_ANDX; - msg.andx.command = SMB_COM_NO_ANDX_COMMAND; - msg.pw_len = 0; - MSGCAT("\\\\"); - MSGCAT(conn->host.name); - MSGCAT("\\"); - MSGCATNULL(req->share); - MSGCATNULL(SERVICENAME); /* Match any type of service */ - byte_count = p - msg.bytes; - msg.byte_count = smb_swap16((unsigned short)byte_count); - - return smb_send_message(conn, SMB_COM_TREE_CONNECT_ANDX, &msg, - sizeof(msg) - sizeof(msg.bytes) + byte_count); -} - -static CURLcode smb_send_open(struct connectdata *conn) -{ - struct smb_request *req = conn->data->req.protop; - struct smb_nt_create msg; - size_t byte_count; - - if((strlen(req->path) + 1) > sizeof(msg.bytes)) - return CURLE_FILESIZE_EXCEEDED; - - memset(&msg, 0, sizeof(msg)); - msg.word_count = SMB_WC_NT_CREATE_ANDX; - msg.andx.command = SMB_COM_NO_ANDX_COMMAND; - byte_count = strlen(req->path); - msg.name_length = smb_swap16((unsigned short)byte_count); - msg.share_access = smb_swap32(SMB_FILE_SHARE_ALL); - if(conn->data->set.upload) { - msg.access = smb_swap32(SMB_GENERIC_READ | SMB_GENERIC_WRITE); - msg.create_disposition = smb_swap32(SMB_FILE_OVERWRITE_IF); - } - else { - msg.access = smb_swap32(SMB_GENERIC_READ); - msg.create_disposition = smb_swap32(SMB_FILE_OPEN); - } - msg.byte_count = smb_swap16((unsigned short) ++byte_count); - strcpy(msg.bytes, req->path); - - return smb_send_message(conn, SMB_COM_NT_CREATE_ANDX, &msg, - sizeof(msg) - sizeof(msg.bytes) + byte_count); -} - -static CURLcode smb_send_close(struct connectdata *conn) -{ - struct smb_request *req = conn->data->req.protop; - struct smb_close msg; - - memset(&msg, 0, sizeof(msg)); - msg.word_count = SMB_WC_CLOSE; - msg.fid = smb_swap16(req->fid); - - return smb_send_message(conn, SMB_COM_CLOSE, &msg, sizeof(msg)); -} - -static CURLcode smb_send_tree_disconnect(struct connectdata *conn) -{ - struct smb_tree_disconnect msg; - - memset(&msg, 0, sizeof(msg)); - - return smb_send_message(conn, SMB_COM_TREE_DISCONNECT, &msg, sizeof(msg)); -} - -static CURLcode smb_send_read(struct connectdata *conn) -{ - struct smb_request *req = conn->data->req.protop; - curl_off_t offset = conn->data->req.offset; - struct smb_read msg; - - memset(&msg, 0, sizeof(msg)); - msg.word_count = SMB_WC_READ_ANDX; - msg.andx.command = SMB_COM_NO_ANDX_COMMAND; - msg.fid = smb_swap16(req->fid); - msg.offset = smb_swap32((unsigned int) offset); - msg.offset_high = smb_swap32((unsigned int) (offset >> 32)); - msg.min_bytes = smb_swap16(MAX_PAYLOAD_SIZE); - msg.max_bytes = smb_swap16(MAX_PAYLOAD_SIZE); - - return smb_send_message(conn, SMB_COM_READ_ANDX, &msg, sizeof(msg)); -} - -static CURLcode smb_send_write(struct connectdata *conn) -{ - struct smb_write *msg = (struct smb_write *)conn->data->state.uploadbuffer; - struct smb_request *req = conn->data->req.protop; - curl_off_t offset = conn->data->req.offset; - - curl_off_t upload_size = conn->data->req.size - conn->data->req.bytecount; - if(upload_size >= MAX_PAYLOAD_SIZE - 1) /* There is one byte of padding */ - upload_size = MAX_PAYLOAD_SIZE - 1; - - memset(msg, 0, sizeof(*msg)); - msg->word_count = SMB_WC_WRITE_ANDX; - msg->andx.command = SMB_COM_NO_ANDX_COMMAND; - msg->fid = smb_swap16(req->fid); - msg->offset = smb_swap32((unsigned int) offset); - msg->offset_high = smb_swap32((unsigned int) (offset >> 32)); - msg->data_length = smb_swap16((unsigned short) upload_size); - msg->data_offset = smb_swap16(sizeof(*msg) - sizeof(unsigned int)); - msg->byte_count = smb_swap16((unsigned short) (upload_size + 1)); - - smb_format_message(conn, &msg->h, SMB_COM_WRITE_ANDX, - sizeof(*msg) - sizeof(msg->h) + (size_t) upload_size); - - return smb_send(conn, sizeof(*msg), (size_t) upload_size); -} - -static CURLcode smb_send_and_recv(struct connectdata *conn, void **msg) -{ - struct smb_conn *smbc = &conn->proto.smbc; - CURLcode result; - - /* Check if there is data in the transfer buffer */ - if(!smbc->send_size && smbc->upload_size) { - int nread = smbc->upload_size > BUFSIZE ? BUFSIZE : - (int) smbc->upload_size; - conn->data->req.upload_fromhere = conn->data->state.uploadbuffer; - result = Curl_fillreadbuffer(conn, nread, &nread); - if(result && result != CURLE_AGAIN) - return result; - if(!nread) - return CURLE_OK; - - smbc->upload_size -= nread; - smbc->send_size = nread; - smbc->sent = 0; - } - - /* Check if there is data to send */ - if(smbc->send_size) { - result = smb_flush(conn); - if(result) - return result; - } - - /* Check if there is still data to be sent */ - if(smbc->send_size || smbc->upload_size) - return CURLE_AGAIN; - - return smb_recv_message(conn, msg); -} - -static CURLcode smb_connection_state(struct connectdata *conn, bool *done) -{ - struct smb_conn *smbc = &conn->proto.smbc; - struct smb_negotiate_response *nrsp; - struct smb_header *h; - CURLcode result; - void *msg = NULL; - - if(smbc->state == SMB_CONNECTING) { -#ifdef USE_SSL - if((conn->handler->flags & PROTOPT_SSL)) { - bool ssl_done; - result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &ssl_done); - if(result && result != CURLE_AGAIN) - return result; - if(!ssl_done) - return CURLE_OK; - } -#endif - - result = smb_send_negotiate(conn); - if(result) { - connclose(conn, "SMB: failed to send negotiate message"); - return result; - } - - conn_state(conn, SMB_NEGOTIATE); - } - - /* Send the previous message and check for a response */ - result = smb_send_and_recv(conn, &msg); - if(result && result != CURLE_AGAIN) { - connclose(conn, "SMB: failed to communicate"); - return result; - } - - if(!msg) - return CURLE_OK; - - h = msg; - - switch(smbc->state) { - case SMB_NEGOTIATE: - if(h->status) { - connclose(conn, "SMB: negotiation failed"); - return CURLE_COULDNT_CONNECT; - } - nrsp = msg; - memcpy(smbc->challenge, nrsp->bytes, sizeof(smbc->challenge)); - smbc->session_key = smb_swap32(nrsp->session_key); - result = smb_send_setup(conn); - if(result) { - connclose(conn, "SMB: failed to send setup message"); - return result; - } - conn_state(conn, SMB_SETUP); - break; - - case SMB_SETUP: - if(h->status) { - connclose(conn, "SMB: authentication failed"); - return CURLE_LOGIN_DENIED; - } - smbc->uid = smb_swap16(h->uid); - conn_state(conn, SMB_CONNECTED); - *done = true; - break; - - default: - smb_pop_message(conn); - return CURLE_OK; /* ignore */ - } - - smb_pop_message(conn); - - return CURLE_OK; -} - -static CURLcode smb_request_state(struct connectdata *conn, bool *done) -{ - struct smb_request *req = conn->data->req.protop; - struct smb_header *h; - enum smb_req_state next_state = SMB_DONE; - unsigned short len; - unsigned short off; - CURLcode result; - void *msg = NULL; - - /* Start the request */ - if(req->state == SMB_REQUESTING) { - result = smb_send_tree_connect(conn); - if(result) { - connclose(conn, "SMB: failed to send tree connect message"); - return result; - } - - request_state(conn, SMB_TREE_CONNECT); - } - - /* Send the previous message and check for a response */ - result = smb_send_and_recv(conn, &msg); - if(result && result != CURLE_AGAIN) { - connclose(conn, "SMB: failed to communicate"); - return result; - } - - if(!msg) - return CURLE_OK; - - h = msg; - - switch(req->state) { - case SMB_TREE_CONNECT: - if(h->status) { - req->result = CURLE_REMOTE_FILE_NOT_FOUND; - if(h->status == smb_swap32(SMB_ERR_NOACCESS)) - req->result = CURLE_REMOTE_ACCESS_DENIED; - break; - } - req->tid = smb_swap16(h->tid); - next_state = SMB_OPEN; - break; - - case SMB_OPEN: - if(h->status) { - req->result = CURLE_REMOTE_FILE_NOT_FOUND; - next_state = SMB_TREE_DISCONNECT; - break; - } - req->fid = smb_swap16(((struct smb_nt_create_response *)msg)->fid); - conn->data->req.offset = 0; - if(conn->data->set.upload) { - conn->data->req.size = conn->data->state.infilesize; - Curl_pgrsSetUploadSize(conn->data, conn->data->req.size); - next_state = SMB_UPLOAD; - } - else { - conn->data->req.size = - smb_swap64(((struct smb_nt_create_response *)msg)->end_of_file); - Curl_pgrsSetDownloadSize(conn->data, conn->data->req.size); - next_state = SMB_DOWNLOAD; - } - break; - - case SMB_DOWNLOAD: - if(h->status) { - req->result = CURLE_RECV_ERROR; - next_state = SMB_CLOSE; - break; - } - len = Curl_read16_le(((unsigned char *) msg) + - sizeof(struct smb_header) + 11); - off = Curl_read16_le(((unsigned char *) msg) + - sizeof(struct smb_header) + 13); - if(len > 0) { - struct smb_conn *smbc = &conn->proto.smbc; - if(off + sizeof(unsigned int) + len > smbc->got) { - failf(conn->data, "Invalid input packet"); - result = CURLE_RECV_ERROR; - } - else - result = Curl_client_write(conn, CLIENTWRITE_BODY, - (char *)msg + off + sizeof(unsigned int), - len); - if(result) { - req->result = result; - next_state = SMB_CLOSE; - break; - } - } - conn->data->req.bytecount += len; - conn->data->req.offset += len; - Curl_pgrsSetDownloadCounter(conn->data, conn->data->req.bytecount); - next_state = (len < MAX_PAYLOAD_SIZE) ? SMB_CLOSE : SMB_DOWNLOAD; - break; - - case SMB_UPLOAD: - if(h->status) { - req->result = CURLE_UPLOAD_FAILED; - next_state = SMB_CLOSE; - break; - } - len = Curl_read16_le(((unsigned char *) msg) + - sizeof(struct smb_header) + 5); - conn->data->req.bytecount += len; - conn->data->req.offset += len; - Curl_pgrsSetUploadCounter(conn->data, conn->data->req.bytecount); - if(conn->data->req.bytecount >= conn->data->req.size) - next_state = SMB_CLOSE; - else - next_state = SMB_UPLOAD; - break; - - case SMB_CLOSE: - /* We don't care if the close failed, proceed to tree disconnect anyway */ - next_state = SMB_TREE_DISCONNECT; - break; - - case SMB_TREE_DISCONNECT: - next_state = SMB_DONE; - break; - - default: - smb_pop_message(conn); - return CURLE_OK; /* ignore */ - } - - smb_pop_message(conn); - - switch(next_state) { - case SMB_OPEN: - result = smb_send_open(conn); - break; - - case SMB_DOWNLOAD: - result = smb_send_read(conn); - break; - - case SMB_UPLOAD: - result = smb_send_write(conn); - break; - - case SMB_CLOSE: - result = smb_send_close(conn); - break; - - case SMB_TREE_DISCONNECT: - result = smb_send_tree_disconnect(conn); - break; - - case SMB_DONE: - result = req->result; - *done = true; - break; - - default: - break; - } - - if(result) { - connclose(conn, "SMB: failed to send message"); - return result; - } - - request_state(conn, next_state); - - return CURLE_OK; -} - -static CURLcode smb_done(struct connectdata *conn, CURLcode status, - bool premature) -{ - struct smb_request *req = conn->data->req.protop; - - (void) premature; - - Curl_safefree(req->share); - Curl_safefree(conn->data->req.protop); - - return status; -} - -static CURLcode smb_disconnect(struct connectdata *conn, bool dead) -{ - struct smb_conn *smbc = &conn->proto.smbc; - struct smb_request *req = conn->data->req.protop; - - (void) dead; - - Curl_safefree(smbc->domain); - Curl_safefree(smbc->recv_buf); - - /* smb_done is not always called, so cleanup the request */ - if(req) { - Curl_safefree(req->share); - Curl_safefree(conn->data->req.protop); - } - - return CURLE_OK; -} - -static int smb_getsock(struct connectdata *conn, curl_socket_t *socks, - int numsocks) -{ - struct smb_conn *smbc = &conn->proto.smbc; - - if(!numsocks) - return GETSOCK_BLANK; - - socks[0] = conn->sock[FIRSTSOCKET]; - - if(smbc->send_size || smbc->upload_size) - return GETSOCK_WRITESOCK(0); - - return GETSOCK_READSOCK(0); -} - -static CURLcode smb_parse_url_path(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct SessionHandle *data = conn->data; - struct smb_request *req = data->req.protop; - char *path; - char *slash; - - /* URL decode the path */ - result = Curl_urldecode(data, data->state.path, 0, &path, NULL, TRUE); - if(result) - return result; - - /* Parse the path for the share */ - req->share = strdup((*path == '/' || *path == '\\') ? path + 1 : path); - if(!req->share) { - Curl_safefree(path); - - return CURLE_OUT_OF_MEMORY; - } - - slash = strchr(req->share, '/'); - if(!slash) - slash = strchr(req->share, '\\'); - - /* The share must be present */ - if(!slash) { - Curl_safefree(path); - - return CURLE_URL_MALFORMAT; - } - - /* Parse the path for the file path converting any forward slashes into - backslashes */ - *slash++ = 0; - req->path = slash; - for(; *slash; slash++) { - if(*slash == '/') - *slash = '\\'; - } - - Curl_safefree(path); - - return CURLE_OK; -} - -#endif /* !USE_WINDOWS_SSPI || USE_WIN32_CRYPTO */ - -#endif /* CURL_DISABLE_SMB && USE_NTLM && CURL_SIZEOF_CURL_OFF_T > 4 */ diff --git a/lib/smb.h b/lib/smb.h deleted file mode 100644 index 7852fa1..0000000 --- a/lib/smb.h +++ /dev/null @@ -1,271 +0,0 @@ -#ifndef HEADER_CURL_SMB_H -#define HEADER_CURL_SMB_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2014, Bill Nagel , Exacq Technologies - * - * 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 http://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. - * - ***************************************************************************/ - -enum smb_conn_state { - SMB_NOT_CONNECTED = 0, - SMB_CONNECTING, - SMB_NEGOTIATE, - SMB_SETUP, - SMB_CONNECTED -}; - -struct smb_conn { - enum smb_conn_state state; - char *user; - char *domain; - unsigned char challenge[8]; - unsigned int session_key; - unsigned short uid; - char *recv_buf; - size_t upload_size; - size_t send_size; - size_t sent; - size_t got; -}; - -/* - * Definitions for SMB protocol data structures - */ -#ifdef BUILDING_CURL_SMB_C - -#if defined(_MSC_VER) || defined(__ILEC400__) -# define PACK -# pragma pack(push) -# pragma pack(1) -#elif defined(__GNUC__) -# define PACK __attribute__((packed)) -#else -# define PACK -#endif - -#define SMB_COM_CLOSE 0x04 -#define SMB_COM_READ_ANDX 0x2e -#define SMB_COM_WRITE_ANDX 0x2f -#define SMB_COM_TREE_DISCONNECT 0x71 -#define SMB_COM_NEGOTIATE 0x72 -#define SMB_COM_SETUP_ANDX 0x73 -#define SMB_COM_TREE_CONNECT_ANDX 0x75 -#define SMB_COM_NT_CREATE_ANDX 0xa2 -#define SMB_COM_NO_ANDX_COMMAND 0xff - -#define SMB_WC_CLOSE 0x03 -#define SMB_WC_READ_ANDX 0x0c -#define SMB_WC_WRITE_ANDX 0x0e -#define SMB_WC_SETUP_ANDX 0x0d -#define SMB_WC_TREE_CONNECT_ANDX 0x04 -#define SMB_WC_NT_CREATE_ANDX 0x18 - -#define SMB_FLAGS_CANONICAL_PATHNAMES 0x10 -#define SMB_FLAGS_CASELESS_PATHNAMES 0x08 -#define SMB_FLAGS2_UNICODE_STRINGS 0x8000 -#define SMB_FLAGS2_IS_LONG_NAME 0x0040 -#define SMB_FLAGS2_KNOWS_LONG_NAME 0x0001 - -#define SMB_CAP_LARGE_FILES 0x08 -#define SMB_GENERIC_WRITE 0x40000000 -#define SMB_GENERIC_READ 0x80000000 -#define SMB_FILE_SHARE_ALL 0x07 -#define SMB_FILE_OPEN 0x01 -#define SMB_FILE_OVERWRITE_IF 0x05 - -#define SMB_ERR_NOACCESS 0x00050001 - -struct smb_header { - unsigned char nbt_type; - unsigned char nbt_flags; - unsigned short nbt_length; - unsigned char magic[4]; - unsigned char command; - unsigned int status; - unsigned char flags; - unsigned short flags2; - unsigned short pid_high; - unsigned char signature[8]; - unsigned short pad; - unsigned short tid; - unsigned short pid; - unsigned short uid; - unsigned short mid; -} PACK; - -struct smb_negotiate_response { - struct smb_header h; - unsigned char word_count; - unsigned short dialect_index; - unsigned char security_mode; - unsigned short max_mpx_count; - unsigned short max_number_vcs; - unsigned int max_buffer_size; - unsigned int max_raw_size; - unsigned int session_key; - unsigned int capabilities; - unsigned int system_time_low; - unsigned int system_time_high; - unsigned short server_time_zone; - unsigned char encryption_key_length; - unsigned short byte_count; - char bytes[1]; -} PACK; - -struct andx { - unsigned char command; - unsigned char pad; - unsigned short offset; -} PACK; - -struct smb_setup { - unsigned char word_count; - struct andx andx; - unsigned short max_buffer_size; - unsigned short max_mpx_count; - unsigned short vc_number; - unsigned int session_key; - unsigned short lengths[2]; - unsigned int pad; - unsigned int capabilities; - unsigned short byte_count; - char bytes[1024]; -} PACK; - -struct smb_tree_connect { - unsigned char word_count; - struct andx andx; - unsigned short flags; - unsigned short pw_len; - unsigned short byte_count; - char bytes[1024]; -} PACK; - -struct smb_nt_create { - unsigned char word_count; - struct andx andx; - unsigned char pad; - unsigned short name_length; - unsigned int flags; - unsigned int root_fid; - unsigned int access; -#ifdef HAVE_LONGLONG - unsigned long long allocation_size; -#else - unsigned __int64 allocation_size; -#endif - unsigned int ext_file_attributes; - unsigned int share_access; - unsigned int create_disposition; - unsigned int create_options; - unsigned int impersonation_level; - unsigned char security_flags; - unsigned short byte_count; - char bytes[1024]; -} PACK; - -struct smb_nt_create_response { - struct smb_header h; - unsigned char word_count; - struct andx andx; - 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 - 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 -} PACK; - -struct smb_read { - unsigned char word_count; - struct andx andx; - unsigned short fid; - unsigned int offset; - unsigned short max_bytes; - unsigned short min_bytes; - unsigned int timeout; - unsigned short remaining; - unsigned int offset_high; - unsigned short byte_count; -} PACK; - -struct smb_write { - struct smb_header h; - unsigned char word_count; - struct andx andx; - unsigned short fid; - unsigned int offset; - unsigned int timeout; - unsigned short write_mode; - unsigned short remaining; - unsigned short pad; - unsigned short data_length; - unsigned short data_offset; - unsigned int offset_high; - unsigned short byte_count; - unsigned char pad2; -} PACK; - -struct smb_close { - unsigned char word_count; - unsigned short fid; - unsigned int last_mtime; - unsigned short byte_count; -} PACK; - -struct smb_tree_disconnect { - unsigned char word_count; - unsigned short byte_count; -} PACK; - -#if defined(_MSC_VER) || defined(__ILEC400__) -# pragma pack(pop) -#endif - -#endif /* BUILDING_CURL_SMB_C */ - -#if !defined(CURL_DISABLE_SMB) && defined(USE_NTLM) && \ - (CURL_SIZEOF_CURL_OFF_T > 4) - -#if !defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO) - -extern const struct Curl_handler Curl_handler_smb; -extern const struct Curl_handler Curl_handler_smbs; - -#endif /* !USE_WINDOWS_SSPI || USE_WIN32_CRYPTO */ - -#endif /* CURL_DISABLE_SMB && USE_NTLM && CURL_SIZEOF_CURL_OFF_T > 4 */ - -#endif /* HEADER_CURL_SMB_H */ diff --git a/lib/smtp.c b/lib/smtp.c index 7bd5158..5938c3f 100644 --- a/lib/smtp.c +++ b/lib/smtp.c @@ -24,7 +24,6 @@ * RFC3207 SMTP over TLS * RFC4422 Simple Authentication and Security Layer (SASL) * RFC4616 PLAIN authentication - * RFC4752 The Kerberos V5 ("GSSAPI") SASL Mechanism * RFC4954 SMTP Authentication * RFC5321 SMTP protocol * RFC6749 OAuth 2.0 Authorization Framework @@ -62,6 +61,7 @@ #include #include "urldata.h" #include "sendf.h" +#include "if2ip.h" #include "hostip.h" #include "progress.h" #include "transfer.h" @@ -317,9 +317,6 @@ static void state(struct connectdata *conn, smtpstate newstate) "AUTH_DIGESTMD5_RESP", "AUTH_NTLM", "AUTH_NTLM_TYPE2MSG", - "AUTH_GSSAPI", - "AUTH_GSSAPI_TOKEN", - "AUTH_GSSAPI_NO_DATA", "AUTH_XOAUTH2", "AUTH_CANCEL", "AUTH_FINAL", @@ -1149,158 +1146,6 @@ static CURLcode smtp_state_auth_ntlm_type2msg_resp(struct connectdata *conn, } #endif -#if defined(USE_KERBEROS5) -/* For AUTH GSSAPI (without initial response) responses */ -static CURLcode smtp_state_auth_gssapi_resp(struct connectdata *conn, - int smtpcode, - smtpstate instate) -{ - CURLcode result = CURLE_OK; - struct SessionHandle *data = conn->data; - struct smtp_conn *smtpc = &conn->proto.smtpc; - char *respmsg = NULL; - size_t len = 0; - - (void)instate; /* no use for this yet */ - - if(smtpcode != 334) { - failf(data, "Access denied: %d", smtpcode); - result = CURLE_LOGIN_DENIED; - } - else { - /* Create the initial response message */ - result = Curl_sasl_create_gssapi_user_message(data, conn->user, - conn->passwd, "smtp", - smtpc->mutual_auth, NULL, - &conn->krb5, - &respmsg, &len); - if(!result && respmsg) { - /* Send the message */ - result = Curl_pp_sendf(&smtpc->pp, "%s", respmsg); - - if(!result) - state(conn, SMTP_AUTH_GSSAPI_TOKEN); - } - } - - Curl_safefree(respmsg); - - return result; -} - -/* For AUTH GSSAPI user token responses */ -static CURLcode smtp_state_auth_gssapi_token_resp(struct connectdata *conn, - int smtpcode, - smtpstate instate) -{ - CURLcode result = CURLE_OK; - struct SessionHandle *data = conn->data; - struct smtp_conn *smtpc = &conn->proto.smtpc; - char *chlgmsg = NULL; - char *respmsg = NULL; - size_t len = 0; - - (void)instate; /* no use for this yet */ - - if(smtpcode != 334) { - failf(data, "Access denied: %d", smtpcode); - result = CURLE_LOGIN_DENIED; - } - else { - /* Get the challenge message */ - smtp_get_message(data->state.buffer, &chlgmsg); - - if(smtpc->mutual_auth) - /* Decode the user token challenge and create the optional response - message */ - result = Curl_sasl_create_gssapi_user_message(data, NULL, NULL, NULL, - smtpc->mutual_auth, - chlgmsg, &conn->krb5, - &respmsg, &len); - else - /* Decode the security challenge and create the response message */ - result = Curl_sasl_create_gssapi_security_message(data, chlgmsg, - &conn->krb5, - &respmsg, &len); - - if(result) { - if(result == CURLE_BAD_CONTENT_ENCODING) { - /* Send the cancellation */ - result = Curl_pp_sendf(&smtpc->pp, "%s", "*"); - - if(!result) - state(conn, SMTP_AUTH_CANCEL); - } - } - else { - /* Send the response */ - if(respmsg) - result = Curl_pp_sendf(&smtpc->pp, "%s", respmsg); - else - result = Curl_pp_sendf(&smtpc->pp, "%s", ""); - - if(!result) - state(conn, (smtpc->mutual_auth ? SMTP_AUTH_GSSAPI_NO_DATA : - SMTP_AUTH_FINAL)); - } - } - - Curl_safefree(respmsg); - - return result; -} - -/* For AUTH GSSAPI no data responses */ -static CURLcode smtp_state_auth_gssapi_no_data_resp(struct connectdata *conn, - int smtpcode, - smtpstate instate) -{ - CURLcode result = CURLE_OK; - struct SessionHandle *data = conn->data; - char *chlgmsg = NULL; - char *respmsg = NULL; - size_t len = 0; - - (void)instate; /* no use for this yet */ - - if(smtpcode != 334) { - failf(data, "Access denied: %d", smtpcode); - result = CURLE_LOGIN_DENIED; - } - else { - /* Get the challenge message */ - smtp_get_message(data->state.buffer, &chlgmsg); - - /* Decode the security challenge and create the response message */ - result = Curl_sasl_create_gssapi_security_message(data, chlgmsg, - &conn->krb5, - &respmsg, &len); - if(result) { - if(result == CURLE_BAD_CONTENT_ENCODING) { - /* Send the cancellation */ - result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", "*"); - - if(!result) - state(conn, SMTP_AUTH_CANCEL); - } - } - else { - /* Send the response */ - if(respmsg) { - result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", respmsg); - - if(!result) - state(conn, SMTP_AUTH_FINAL); - } - } - } - - Curl_safefree(respmsg); - - return result; -} -#endif - /* For AUTH XOAUTH2 (without initial response) responses */ static CURLcode smtp_state_auth_xoauth2_resp(struct connectdata *conn, int smtpcode, smtpstate instate) @@ -1629,21 +1474,6 @@ static CURLcode smtp_statemach_act(struct connectdata *conn) break; #endif -#if defined(USE_KERBEROS5) - case SMTP_AUTH_GSSAPI: - result = smtp_state_auth_gssapi_resp(conn, smtpcode, smtpc->state); - break; - - case SMTP_AUTH_GSSAPI_TOKEN: - result = smtp_state_auth_gssapi_token_resp(conn, smtpcode, smtpc->state); - break; - - case SMTP_AUTH_GSSAPI_NO_DATA: - result = smtp_state_auth_gssapi_no_data_resp(conn, smtpcode, - smtpc->state); - break; -#endif - case SMTP_AUTH_XOAUTH2: result = smtp_state_auth_xoauth2_resp(conn, smtpcode, smtpc->state); break; @@ -1806,13 +1636,13 @@ static CURLcode smtp_done(struct connectdata *conn, CURLcode status, struct SessionHandle *data = conn->data; struct SMTP *smtp = data->req.protop; struct pingpong *pp = &conn->proto.smtpc.pp; - char *eob; + const char *eob; ssize_t len; ssize_t bytes_written; (void)premature; - if(!smtp || !pp->conn) + if(!smtp) /* When the easy handle is removed from the multi interface while libcurl is still trying to resolve the host name, the SMTP struct is not yet initialized. However, the removal action calls Curl_done() which in @@ -1826,45 +1656,30 @@ static CURLcode smtp_done(struct connectdata *conn, CURLcode status, else if(!data->set.connect_only && data->set.upload && data->set.mail_rcpt) { /* 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. - - Note: As some SSL backends, such as OpenSSL, will cause Curl_write() to - fail when using a different pointer following a previous write, that - returned CURLE_AGAIN, we duplicate the EOB now rather than when the - bytes written doesn't equal len. */ + is "no mail data". RFC-5321, sect. 4.1.1.4. */ + eob = SMTP_EOB; + len = SMTP_EOB_LEN; if(smtp->trailing_crlf || !conn->data->state.infilesize) { - eob = strdup(SMTP_EOB + 2); - len = SMTP_EOB_LEN - 2; - } - else { - eob = strdup(SMTP_EOB); - len = SMTP_EOB_LEN; + eob += 2; + len -= 2; } - if(!eob) - return CURLE_OUT_OF_MEMORY; - /* Send the end of block data */ result = Curl_write(conn, conn->writesockfd, eob, len, &bytes_written); - if(result) { - free(eob); + if(result) return result; - } if(bytes_written != len) { /* The whole chunk was not sent so keep it around and adjust the pingpong structure accordingly */ - pp->sendthis = eob; + pp->sendthis = strdup(eob); pp->sendsize = len; pp->sendleft = len - bytes_written; } - else { + else /* Successfully sent so adjust the response timeout relative to now */ pp->response = Curl_tvnow(); - free(eob); - } - state(conn, SMTP_POSTDATA); /* Run the state-machine @@ -2045,8 +1860,8 @@ static CURLcode smtp_regular_transfer(struct connectdata *conn, /* Set the progress data */ Curl_pgrsSetUploadCounter(data, 0); Curl_pgrsSetDownloadCounter(data, 0); - Curl_pgrsSetUploadSize(data, -1); - Curl_pgrsSetDownloadSize(data, -1); + Curl_pgrsSetUploadSize(data, 0); + Curl_pgrsSetDownloadSize(data, 0); /* Carry out the perform */ result = smtp_perform(conn, &connected, dophase_done); @@ -2220,25 +2035,6 @@ static CURLcode smtp_calc_sasl_details(struct connectdata *conn, /* Calculate the supported authentication mechanism, by decreasing order of security, as well as the initial response where appropriate */ -#if defined(USE_KERBEROS5) - if((smtpc->authmechs & SASL_MECH_GSSAPI) && - (smtpc->prefmech & SASL_MECH_GSSAPI)) { - smtpc->mutual_auth = FALSE; /* TODO: Calculate mutual authentication */ - - *mech = SASL_MECH_STRING_GSSAPI; - *state1 = SMTP_AUTH_GSSAPI; - *state2 = SMTP_AUTH_GSSAPI_TOKEN; - smtpc->authused = SASL_MECH_GSSAPI; - - if(data->set.sasl_ir) - result = Curl_sasl_create_gssapi_user_message(data, conn->user, - conn->passwd, "smtp", - smtpc->mutual_auth, - NULL, &conn->krb5, - initresp, len); - } - else -#endif #ifndef CURL_DISABLE_CRYPTO_AUTH if((smtpc->authmechs & SASL_MECH_DIGEST_MD5) && (smtpc->prefmech & SASL_MECH_DIGEST_MD5)) { @@ -2307,7 +2103,7 @@ static CURLcode smtp_calc_sasl_details(struct connectdata *conn, return result; } -CURLcode Curl_smtp_escape_eob(struct connectdata *conn, const ssize_t nread) +CURLcode Curl_smtp_escape_eob(struct connectdata *conn, ssize_t nread) { /* When sending a SMTP payload we must detect CRLF. sequences making sure they are sent as CRLF.. instead, as a . on the beginning of a line will @@ -2319,26 +2115,17 @@ CURLcode Curl_smtp_escape_eob(struct connectdata *conn, const ssize_t nread) ssize_t si; struct SessionHandle *data = conn->data; struct SMTP *smtp = data->req.protop; - char *scratch = data->state.scratch; - char *newscratch = NULL; - char *oldscratch = NULL; - size_t eob_sent; - /* Do we need to allocate a scratch buffer? */ - if(!scratch || data->set.crlf) { - oldscratch = scratch; - - scratch = newscratch = malloc(2 * BUFSIZE); - if(!newscratch) { - failf(data, "Failed to alloc scratch buffer!"); + /* Do we need to allocate the scatch buffer? */ + if(!data->state.scratch) { + data->state.scratch = malloc(2 * BUFSIZE); + if(!data->state.scratch) { + failf (data, "Failed to alloc scratch buffer!"); return CURLE_OUT_OF_MEMORY; } } - /* Have we already sent part of the EOB? */ - eob_sent = smtp->eob; - /* This loop can be improved by some kind of Boyer-Moore style of approach but that is saved for later... */ for(i = 0, si = 0; i < nread; i++) { @@ -2353,8 +2140,8 @@ CURLcode Curl_smtp_escape_eob(struct connectdata *conn, const ssize_t nread) } else if(smtp->eob) { /* A previous substring matched so output that first */ - memcpy(&scratch[si], &SMTP_EOB[eob_sent], smtp->eob - eob_sent); - si += smtp->eob - eob_sent; + memcpy(&data->state.scratch[si], SMTP_EOB, smtp->eob); + si += smtp->eob; /* Then compare the first byte */ if(SMTP_EOB[0] == data->req.upload_fromhere[i]) @@ -2362,8 +2149,6 @@ CURLcode Curl_smtp_escape_eob(struct connectdata *conn, const ssize_t nread) else smtp->eob = 0; - eob_sent = 0; - /* Reset the trailing CRLF flag as there was more data */ smtp->trailing_crlf = FALSE; } @@ -2371,38 +2156,31 @@ CURLcode Curl_smtp_escape_eob(struct connectdata *conn, const ssize_t nread) /* Do we have a match for CRLF. as per RFC-5321, sect. 4.5.2 */ if(SMTP_EOB_FIND_LEN == smtp->eob) { /* Copy the replacement data to the target buffer */ - memcpy(&scratch[si], &SMTP_EOB_REPL[eob_sent], - SMTP_EOB_REPL_LEN - eob_sent); - si += SMTP_EOB_REPL_LEN - eob_sent; + memcpy(&data->state.scratch[si], SMTP_EOB_REPL, SMTP_EOB_REPL_LEN); + si += SMTP_EOB_REPL_LEN; smtp->eob = 0; - eob_sent = 0; } else if(!smtp->eob) - scratch[si++] = data->req.upload_fromhere[i]; + data->state.scratch[si++] = data->req.upload_fromhere[i]; } - if(smtp->eob - eob_sent) { + if(smtp->eob) { /* A substring matched before processing ended so output that now */ - memcpy(&scratch[si], &SMTP_EOB[eob_sent], smtp->eob - eob_sent); - si += smtp->eob - eob_sent; + memcpy(&data->state.scratch[si], SMTP_EOB, smtp->eob); + si += smtp->eob; + smtp->eob = 0; } - /* Only use the new buffer if we replaced something */ if(si != nread) { - /* Upload from the new (replaced) buffer instead */ - data->req.upload_fromhere = scratch; + /* Only use the new buffer if we replaced something */ + nread = si; - /* Save the buffer so it can be freed later */ - data->state.scratch = scratch; - - /* Free the old scratch buffer */ - Curl_safefree(oldscratch); + /* Upload from the new (replaced) buffer instead */ + data->req.upload_fromhere = data->state.scratch; /* Set the new amount too */ - data->req.upload_present = si; + data->req.upload_present = nread; } - else - Curl_safefree(newscratch); return CURLE_OK; } diff --git a/lib/smtp.h b/lib/smtp.h index 7a95efe..017b943 100644 --- a/lib/smtp.h +++ b/lib/smtp.h @@ -44,9 +44,6 @@ typedef enum { SMTP_AUTH_DIGESTMD5_RESP, SMTP_AUTH_NTLM, SMTP_AUTH_NTLM_TYPE2MSG, - SMTP_AUTH_GSSAPI, - SMTP_AUTH_GSSAPI_TOKEN, - SMTP_AUTH_GSSAPI_NO_DATA, SMTP_AUTH_XOAUTH2, SMTP_AUTH_CANCEL, SMTP_AUTH_FINAL, @@ -86,7 +83,6 @@ struct smtp_conn { bool size_supported; /* If server supports SIZE extension according to RFC 1870 */ bool auth_supported; /* AUTH capability supported by server */ - bool mutual_auth; /* Mutual authentication enabled (GSSAPI only) */ }; extern const struct Curl_handler Curl_handler_smtp; @@ -101,6 +97,6 @@ extern const struct Curl_handler Curl_handler_smtps; #define SMTP_EOB_REPL "\x0d\x0a\x2e\x2e" #define SMTP_EOB_REPL_LEN 4 -CURLcode Curl_smtp_escape_eob(struct connectdata *conn, const ssize_t nread); +CURLcode Curl_smtp_escape_eob(struct connectdata *conn, ssize_t nread); #endif /* HEADER_CURL_SMTP_H */ diff --git a/lib/socks.c b/lib/socks.c index 6c6585b..d7136c6 100644 --- a/lib/socks.c +++ b/lib/socks.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , 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 @@ CURLcode Curl_SOCKS4(const char *proxy_name, return CURLE_OPERATION_TIMEDOUT; } - (void)curlx_nonblock(sock, FALSE); + curlx_nonblock(sock, FALSE); infof(data, "SOCKS4 communication to %s:%d\n", hostname, remote_port); @@ -238,7 +238,7 @@ CURLcode Curl_SOCKS4(const char *proxy_name, code = Curl_write_plain(conn, sock, (char *)socksreq, packetsize + hostnamelen, &written); - if(code || (written != packetsize + hostnamelen)) { + if((code != CURLE_OK) || (written != packetsize + hostnamelen)) { failf(data, "Failed to send SOCKS4 connect request."); return CURLE_COULDNT_CONNECT; } @@ -247,7 +247,7 @@ CURLcode Curl_SOCKS4(const char *proxy_name, hostnamelen = (ssize_t)strlen(hostname) + 1; code = Curl_write_plain(conn, sock, (char *)hostname, hostnamelen, &written); - if(code || (written != hostnamelen)) { + if((code != CURLE_OK) || (written != hostnamelen)) { failf(data, "Failed to send SOCKS4 connect request."); return CURLE_COULDNT_CONNECT; } @@ -258,7 +258,7 @@ CURLcode Curl_SOCKS4(const char *proxy_name, /* Receive response */ result = Curl_blockread_all(conn, sock, (char *)socksreq, packetsize, &actualread); - if(result || (actualread != packetsize)) { + if((result != CURLE_OK) || (actualread != packetsize)) { failf(data, "Failed to receive SOCKS4 connect request ack."); return CURLE_COULDNT_CONNECT; } @@ -335,7 +335,7 @@ CURLcode Curl_SOCKS4(const char *proxy_name, } } - (void)curlx_nonblock(sock, TRUE); + curlx_nonblock(sock, TRUE); return CURLE_OK; /* Proxy was successful! */ } @@ -396,7 +396,7 @@ CURLcode Curl_SOCKS5(const char *proxy_name, return CURLE_OPERATION_TIMEDOUT; } - (void)curlx_nonblock(sock, TRUE); + curlx_nonblock(sock, TRUE); /* wait until socket gets connected */ result = Curl_socket_ready(CURL_SOCKET_BAD, sock, timeout); @@ -419,7 +419,7 @@ CURLcode Curl_SOCKS5(const char *proxy_name, #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[3] = 1; /* gssapi */ socksreq[4] = 2; /* username/password */ #else socksreq[1] = (char)(proxy_name ? 2 : 1); /* number of methods (below) */ @@ -427,16 +427,16 @@ CURLcode Curl_SOCKS5(const char *proxy_name, socksreq[3] = 2; /* username/password */ #endif - (void)curlx_nonblock(sock, FALSE); + curlx_nonblock(sock, FALSE); code = Curl_write_plain(conn, sock, (char *)socksreq, (2 + (int)socksreq[1]), &written); - if(code || (written != (2 + (int)socksreq[1]))) { + if((code != CURLE_OK) || (written != (2 + (int)socksreq[1]))) { failf(data, "Unable to send initial SOCKS5 request."); return CURLE_COULDNT_CONNECT; } - (void)curlx_nonblock(sock, TRUE); + curlx_nonblock(sock, TRUE); result = Curl_socket_ready(sock, CURL_SOCKET_BAD, timeout); @@ -454,10 +454,10 @@ CURLcode Curl_SOCKS5(const char *proxy_name, return CURLE_RECV_ERROR; } - (void)curlx_nonblock(sock, FALSE); + curlx_nonblock(sock, FALSE); result=Curl_blockread_all(conn, sock, (char *)socksreq, 2, &actualread); - if(result || (actualread != 2)) { + if((result != CURLE_OK) || (actualread != 2)) { failf(data, "Unable to receive initial SOCKS5 response."); return CURLE_COULDNT_CONNECT; } @@ -473,8 +473,8 @@ CURLcode Curl_SOCKS5(const char *proxy_name, #if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) else if(socksreq[1] == 1) { code = Curl_SOCKS5_gssapi_negotiate(sockindex, conn); - if(code) { - failf(data, "Unable to negotiate SOCKS5 GSS-API context."); + if(code != CURLE_OK) { + failf(data, "Unable to negotiate SOCKS5 gssapi context."); return CURLE_COULDNT_CONNECT; } } @@ -510,13 +510,13 @@ CURLcode Curl_SOCKS5(const char *proxy_name, len += proxy_password_len; code = Curl_write_plain(conn, sock, (char *)socksreq, len, &written); - if(code || (len != written)) { + if((code != CURLE_OK) || (len != written)) { failf(data, "Failed to send SOCKS5 sub-negotiation request."); return CURLE_COULDNT_CONNECT; } result=Curl_blockread_all(conn, sock, (char *)socksreq, 2, &actualread); - if(result || (actualread != 2)) { + if((result != CURLE_OK) || (actualread != 2)) { failf(data, "Unable to receive SOCKS5 sub-negotiation response."); return CURLE_COULDNT_CONNECT; } @@ -583,7 +583,7 @@ CURLcode Curl_SOCKS5(const char *proxy_name, if(rc == CURLRESOLV_PENDING) { /* this requires that we're in "wait for resolve" state */ code = Curl_resolver_wait_resolv(conn, &dns); - if(code) + if(code != CURLE_OK) return code; } @@ -636,13 +636,13 @@ CURLcode Curl_SOCKS5(const char *proxy_name, #if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) if(conn->socks5_gssapi_enctype) { - failf(data, "SOCKS5 GSS-API protection not yet implemented."); + failf(data, "SOCKS5 gssapi protection not yet implemented."); } else #endif code = Curl_write_plain(conn, sock, (char *)socksreq, len, &written); - if(code || (len != written)) { + if((code != CURLE_OK) || (len != written)) { failf(data, "Failed to send SOCKS5 connect request."); return CURLE_COULDNT_CONNECT; } @@ -651,14 +651,14 @@ CURLcode Curl_SOCKS5(const char *proxy_name, #if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) if(conn->socks5_gssapi_enctype) { - failf(data, "SOCKS5 GSS-API protection not yet implemented."); + failf(data, "SOCKS5 gssapi protection not yet implemented."); } else #endif result = Curl_blockread_all(conn, sock, (char *)socksreq, len, &actualread); - if(result || (len != actualread)) { + if((result != CURLE_OK) || (len != actualread)) { failf(data, "Failed to receive SOCKS5 connect request ack."); return CURLE_COULDNT_CONNECT; } @@ -738,7 +738,7 @@ CURLcode Curl_SOCKS5(const char *proxy_name, len -= 10; result = Curl_blockread_all(conn, sock, (char *)&socksreq[10], len, &actualread); - if(result || (len != actualread)) { + if((result != CURLE_OK) || (len != actualread)) { failf(data, "Failed to receive SOCKS5 connect request ack."); return CURLE_COULDNT_CONNECT; } @@ -747,7 +747,7 @@ CURLcode Curl_SOCKS5(const char *proxy_name, } #endif - (void)curlx_nonblock(sock, TRUE); + curlx_nonblock(sock, TRUE); return CURLE_OK; /* Proxy was successful! */ } diff --git a/lib/socks.h b/lib/socks.h index 29e3bf0..dc4670b 100644 --- a/lib/socks.h +++ b/lib/socks.h @@ -65,7 +65,7 @@ CURLcode Curl_SOCKS5(const char *proxy_name, #if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) /* - * This function handles the SOCKS5 GSS-API negotiation and initialisation + * This function handles the sockss5 gssapie negotiation and initialisation */ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, struct connectdata *conn); diff --git a/lib/socks_gssapi.c b/lib/socks_gssapi.c index 8a016d0..1f840bd 100644 --- a/lib/socks_gssapi.c +++ b/lib/socks_gssapi.c @@ -6,7 +6,7 @@ * \___|\___/|_| \_\_____| * * Copyright (C) 2009, 2011, Markus Moeller, - * Copyright (C) 2012 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 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 @@ -23,7 +23,16 @@ #include "curl_setup.h" -#if defined(HAVE_GSSAPI) && !defined(CURL_DISABLE_PROXY) +#ifndef CURL_DISABLE_PROXY + +#ifdef HAVE_GSSAPI +#ifdef HAVE_OLD_GSSMIT +#define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name +#define NCOMPAT 1 +#endif +#ifndef gss_nt_service_name +#define gss_nt_service_name GSS_C_NT_HOSTBASED_SERVICE +#endif #include "curl_gssapi.h" #include "urldata.h" @@ -43,7 +52,7 @@ static gss_ctx_id_t gss_context = GSS_C_NO_CONTEXT; /* - * Helper GSS-API error functions. + * Helper gssapi error functions. */ static int check_gss_err(struct SessionHandle *data, OM_uint32 major_status, @@ -94,7 +103,7 @@ static int check_gss_err(struct SessionHandle *data, } gss_release_buffer(&min_stat, &status_string); } - failf(data, "GSS-API error: %s failed:\n%s", function, buf); + failf(data, "GSSAPI error: %s failed:\n%s", function, buf); return(1); } @@ -122,10 +131,10 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, gss_name_t gss_client_name = GSS_C_NO_NAME; unsigned short us_length; char *user=NULL; - unsigned char socksreq[4]; /* room for GSS-API exchange header only */ + unsigned char socksreq[4]; /* room for gssapi exchange header only */ char *serviceptr = data->set.str[STRING_SOCKS5_GSSAPI_SERVICE]; - /* GSS-API request looks like + /* GSSAPI request looks like * +----+------+-----+----------------+ * |VER | MTYP | LEN | TOKEN | * +----+------+----------------------+ @@ -153,7 +162,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, serviceptr, conn->proxy.name); gss_major_status = gss_import_name(&gss_minor_status, &service, - GSS_C_NT_HOSTBASED_SERVICE, &server); + gss_nt_service_name, &server); } gss_release_buffer(&gss_status, &service); /* clear allocated memory */ @@ -172,11 +181,9 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, &gss_minor_status, &gss_context, server, - &Curl_krb5_mech_oid, NULL, gss_token, &gss_send_token, - TRUE, &gss_ret_flags); if(gss_token != GSS_C_NO_BUFFER) @@ -187,19 +194,19 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, gss_release_buffer(&gss_status, &gss_recv_token); gss_release_buffer(&gss_status, &gss_send_token); gss_delete_sec_context(&gss_status, &gss_context, NULL); - failf(data, "Failed to initial GSS-API token."); + failf(data, "Failed to initial GSSAPI token."); return CURLE_COULDNT_CONNECT; } if(gss_send_token.length != 0) { - socksreq[0] = 1; /* GSS-API subnegotiation version */ + socksreq[0] = 1; /* gssapi subnegotiation version */ socksreq[1] = 1; /* authentication message type */ us_length = htons((short)gss_send_token.length); memcpy(socksreq+2,&us_length,sizeof(short)); code = Curl_write_plain(conn, sock, (char *)socksreq, 4, &written); - if(code || (4 != written)) { - failf(data, "Failed to send GSS-API authentication request."); + if((code != CURLE_OK) || (4 != written)) { + failf(data, "Failed to send GSSAPI authentication request."); gss_release_name(&gss_status, &server); gss_release_buffer(&gss_status, &gss_recv_token); gss_release_buffer(&gss_status, &gss_send_token); @@ -210,8 +217,8 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, code = Curl_write_plain(conn, sock, (char *)gss_send_token.value, gss_send_token.length, &written); - if(code || ((ssize_t)gss_send_token.length != written)) { - failf(data, "Failed to send GSS-API authentication token."); + if((code != CURLE_OK) || ((ssize_t)gss_send_token.length != written)) { + failf(data, "Failed to send GSSAPI authentication token."); gss_release_name(&gss_status, &server); gss_release_buffer(&gss_status, &gss_recv_token); gss_release_buffer(&gss_status, &gss_send_token); @@ -227,7 +234,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, /* analyse response */ - /* GSS-API response looks like + /* GSSAPI response looks like * +----+------+-----+----------------+ * |VER | MTYP | LEN | TOKEN | * +----+------+----------------------+ @@ -236,8 +243,8 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, */ result=Curl_blockread_all(conn, sock, (char *)socksreq, 4, &actualread); - if(result || (actualread != 4)) { - failf(data, "Failed to receive GSS-API authentication response."); + if(result != CURLE_OK || actualread != 4) { + failf(data, "Failed to receive GSSAPI authentication response."); gss_release_name(&gss_status, &server); gss_delete_sec_context(&gss_status, &gss_context, NULL); return CURLE_COULDNT_CONNECT; @@ -253,7 +260,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, } if(socksreq[1] != 1) { /* status / messgae type */ - failf(data, "Invalid GSS-API authentication response type (%d %d).", + failf(data, "Invalid GSSAPI authentication response type (%d %d).", socksreq[0], socksreq[1]); gss_release_name(&gss_status, &server); gss_delete_sec_context(&gss_status, &gss_context, NULL); @@ -267,7 +274,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, gss_recv_token.value=malloc(us_length); if(!gss_recv_token.value) { failf(data, - "Could not allocate memory for GSS-API authentication " + "Could not allocate memory for GSSAPI authentication " "response token."); gss_release_name(&gss_status, &server); gss_delete_sec_context(&gss_status, &gss_context, NULL); @@ -277,8 +284,8 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, 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."); + if(result != CURLE_OK || actualread != us_length) { + failf(data, "Failed to receive GSSAPI authentication token."); gss_release_name(&gss_status, &server); gss_release_buffer(&gss_status, &gss_recv_token); gss_delete_sec_context(&gss_status, &gss_context, NULL); @@ -323,12 +330,12 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, user[gss_send_token.length] = '\0'; gss_release_name(&gss_status, &gss_client_name); gss_release_buffer(&gss_status, &gss_send_token); - infof(data, "SOCKS5 server authencticated user %s with GSS-API.\n",user); + infof(data, "SOCKS5 server authencticated user %s with gssapi.\n",user); free(user); user=NULL; /* Do encryption */ - socksreq[0] = 1; /* GSS-API subnegotiation version */ + socksreq[0] = 1; /* gssapi subnegotiation version */ socksreq[1] = 2; /* encryption message type */ gss_enc = 0; /* no data protection */ @@ -339,7 +346,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, else if(gss_ret_flags & GSS_C_INTEG_FLAG) gss_enc = 1; - infof(data, "SOCKS5 server supports GSS-API %s data protection.\n", + infof(data, "SOCKS5 server supports gssapi %s data protection.\n", (gss_enc==0)?"no":((gss_enc==1)?"integrity":"confidentiality")); /* force for the moment to no data protection */ gss_enc = 0; @@ -394,7 +401,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, gss_release_buffer(&gss_status, &gss_send_token); gss_release_buffer(&gss_status, &gss_w_token); gss_delete_sec_context(&gss_status, &gss_context, NULL); - failf(data, "Failed to wrap GSS-API encryption value into token."); + failf(data, "Failed to wrap GSSAPI encryption value into token."); return CURLE_COULDNT_CONNECT; } gss_release_buffer(&gss_status, &gss_send_token); @@ -404,8 +411,8 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, } code = Curl_write_plain(conn, sock, (char *)socksreq, 4, &written); - if(code || (4 != written)) { - failf(data, "Failed to send GSS-API encryption request."); + if((code != CURLE_OK) || (4 != written)) { + failf(data, "Failed to send GSSAPI encryption request."); gss_release_buffer(&gss_status, &gss_w_token); gss_delete_sec_context(&gss_status, &gss_context, NULL); return CURLE_COULDNT_CONNECT; @@ -414,8 +421,8 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, if(data->set.socks5_gssapi_nec) { memcpy(socksreq, &gss_enc, 1); code = Curl_write_plain(conn, sock, socksreq, 1, &written); - if(code || ( 1 != written)) { - failf(data, "Failed to send GSS-API encryption type."); + if((code != CURLE_OK) || ( 1 != written)) { + failf(data, "Failed to send GSSAPI encryption type."); gss_delete_sec_context(&gss_status, &gss_context, NULL); return CURLE_COULDNT_CONNECT; } @@ -423,8 +430,8 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, else { code = Curl_write_plain(conn, sock, (char *)gss_w_token.value, gss_w_token.length, &written); - if(code || ((ssize_t)gss_w_token.length != written)) { - failf(data, "Failed to send GSS-API encryption type."); + if((code != CURLE_OK) || ((ssize_t)gss_w_token.length != written)) { + failf(data, "Failed to send GSSAPI encryption type."); gss_release_buffer(&gss_status, &gss_w_token); gss_delete_sec_context(&gss_status, &gss_context, NULL); return CURLE_COULDNT_CONNECT; @@ -433,8 +440,8 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, } result=Curl_blockread_all(conn, sock, (char *)socksreq, 4, &actualread); - if(result || (actualread != 4)) { - failf(data, "Failed to receive GSS-API encryption response."); + if(result != CURLE_OK || actualread != 4) { + failf(data, "Failed to receive GSSAPI encryption response."); gss_delete_sec_context(&gss_status, &gss_context, NULL); return CURLE_COULDNT_CONNECT; } @@ -448,7 +455,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, } if(socksreq[1] != 2) { /* status / messgae type */ - failf(data, "Invalid GSS-API encryption response type (%d %d).", + failf(data, "Invalid GSSAPI encryption response type (%d %d).", socksreq[0], socksreq[1]); gss_delete_sec_context(&gss_status, &gss_context, NULL); return CURLE_COULDNT_CONNECT; @@ -466,8 +473,8 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, 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."); + if(result != CURLE_OK || actualread != us_length) { + failf(data, "Failed to receive GSSAPI encryptrion type."); gss_release_buffer(&gss_status, &gss_recv_token); gss_delete_sec_context(&gss_status, &gss_context, NULL); return CURLE_COULDNT_CONNECT; @@ -482,13 +489,13 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, gss_release_buffer(&gss_status, &gss_recv_token); gss_release_buffer(&gss_status, &gss_w_token); gss_delete_sec_context(&gss_status, &gss_context, NULL); - failf(data, "Failed to unwrap GSS-API encryption value into token."); + failf(data, "Failed to unwrap GSSAPI encryption value into token."); return CURLE_COULDNT_CONNECT; } gss_release_buffer(&gss_status, &gss_recv_token); if(gss_w_token.length != 1) { - failf(data, "Invalid GSS-API encryption response length (%d).", + failf(data, "Invalid GSSAPI encryption response length (%d).", gss_w_token.length); gss_release_buffer(&gss_status, &gss_w_token); gss_delete_sec_context(&gss_status, &gss_context, NULL); @@ -500,7 +507,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, } else { if(gss_recv_token.length != 1) { - failf(data, "Invalid GSS-API encryption response length (%d).", + failf(data, "Invalid GSSAPI encryption response length (%d).", gss_recv_token.length); gss_release_buffer(&gss_status, &gss_recv_token); gss_delete_sec_context(&gss_status, &gss_context, NULL); @@ -512,8 +519,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 gssapi data": + ((socksreq[0]==1)?" gssapi integrity":" gssapi confidentiality")); conn->socks5_gssapi_enctype = socksreq[0]; if(socksreq[0] == 0) @@ -521,5 +528,6 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, return CURLE_OK; } +#endif -#endif /* HAVE_GSSAPI && !CURL_DISABLE_PROXY */ +#endif /* CURL_DISABLE_PROXY */ diff --git a/lib/socks_sspi.c b/lib/socks_sspi.c index 0158627..4cf6188 100644 --- a/lib/socks_sspi.c +++ b/lib/socks_sspi.c @@ -6,7 +6,7 @@ * \___|\___/|_| \_\_____| * * Copyright (C) 2009, 2011, Markus Moeller, - * Copyright (C) 2012 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 2012 - 2013, Daniel Stenberg, , 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,6 +43,12 @@ #include "memdebug.h" /* + * Definitions required from ntsecapi.h are directly provided below this point + * to avoid including ntsecapi.h due to a conflict with OpenSSL's safestack.h + */ +#define KERB_WRAP_NO_ENCRYPT 0x80000001 + +/* * Helper sspi error functions. */ static int check_sspi_err(struct connectdata *conn, @@ -70,7 +76,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, ssize_t actualread; ssize_t written; int result; - /* Needs GSS-API authentication */ + /* Needs GSSAPI authentication */ SECURITY_STATUS status; unsigned long sspi_ret_flags = 0; int gss_enc; @@ -85,10 +91,10 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, char *service_name = NULL; unsigned short us_length; unsigned long qop; - unsigned char socksreq[4]; /* room for GSS-API exchange header only */ + unsigned char socksreq[4]; /* room for gssapi exchange header only */ char *service = data->set.str[STRING_SOCKS5_GSSAPI_SERVICE]; - /* GSS-API request looks like + /* GSSAPI request looks like * +----+------+-----+----------------+ * |VER | MTYP | LEN | TOKEN | * +----+------+----------------------+ @@ -195,13 +201,13 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, } if(sspi_send_token.cbBuffer != 0) { - socksreq[0] = 1; /* GSS-API subnegotiation version */ + socksreq[0] = 1; /* gssapi subnegotiation version */ socksreq[1] = 1; /* authentication message type */ us_length = htons((short)sspi_send_token.cbBuffer); memcpy(socksreq+2, &us_length, sizeof(short)); code = Curl_write_plain(conn, sock, (char *)socksreq, 4, &written); - if(code || (4 != written)) { + if((code != CURLE_OK) || (4 != written)) { failf(data, "Failed to send SSPI authentication request."); Curl_safefree(service_name); if(sspi_send_token.pvBuffer) @@ -215,7 +221,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, code = Curl_write_plain(conn, sock, (char *)sspi_send_token.pvBuffer, sspi_send_token.cbBuffer, &written); - if(code || (sspi_send_token.cbBuffer != (size_t)written)) { + if((code != CURLE_OK) || (sspi_send_token.cbBuffer != (size_t)written)) { failf(data, "Failed to send SSPI authentication token."); Curl_safefree(service_name); if(sspi_send_token.pvBuffer) @@ -246,7 +252,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, /* analyse response */ - /* GSS-API response looks like + /* GSSAPI response looks like * +----+------+-----+----------------+ * |VER | MTYP | LEN | TOKEN | * +----+------+----------------------+ @@ -255,7 +261,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, */ result = Curl_blockread_all(conn, sock, (char *)socksreq, 4, &actualread); - if(result || (actualread != 4)) { + if(result != CURLE_OK || actualread != 4) { failf(data, "Failed to receive SSPI authentication response."); Curl_safefree(service_name); s_pSecFn->FreeCredentialsHandle(&cred_handle); @@ -297,7 +303,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, result = Curl_blockread_all(conn, sock, (char *)sspi_recv_token.pvBuffer, sspi_recv_token.cbBuffer, &actualread); - if(result || (actualread != us_length)) { + if(result != CURLE_OK || actualread != us_length) { failf(data, "Failed to receive SSPI authentication token."); Curl_safefree(service_name); if(sspi_recv_token.pvBuffer) @@ -323,12 +329,12 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, failf(data, "Failed to determine user name."); return CURLE_COULDNT_CONNECT; } - infof(data, "SOCKS5 server authencticated user %s with GSS-API.\n", + infof(data, "SOCKS5 server authencticated user %s with gssapi.\n", names.sUserName); s_pSecFn->FreeContextBuffer(names.sUserName); /* Do encryption */ - socksreq[0] = 1; /* GSS-API subnegotiation version */ + socksreq[0] = 1; /* gssapi subnegotiation version */ socksreq[1] = 2; /* encryption message type */ gss_enc = 0; /* no data protection */ @@ -339,7 +345,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, else if(sspi_ret_flags & ISC_REQ_INTEGRITY) gss_enc = 1; - infof(data, "SOCKS5 server supports GSS-API %s data protection.\n", + infof(data, "SOCKS5 server supports gssapi %s data protection.\n", (gss_enc==0)?"no":((gss_enc==1)?"integrity":"confidentiality") ); /* force to no data protection, avoid encryption/decryption for now */ gss_enc = 0; @@ -463,7 +469,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, } code = Curl_write_plain(conn, sock, (char *)socksreq, 4, &written); - if(code || (4 != written)) { + if((code != CURLE_OK) || (4 != written)) { failf(data, "Failed to send SSPI encryption request."); if(sspi_send_token.pvBuffer) s_pSecFn->FreeContextBuffer(sspi_send_token.pvBuffer); @@ -474,7 +480,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, if(data->set.socks5_gssapi_nec) { memcpy(socksreq,&gss_enc,1); code = Curl_write_plain(conn, sock, (char *)socksreq, 1, &written); - if(code || (1 != written)) { + if((code != CURLE_OK) || (1 != written)) { failf(data, "Failed to send SSPI encryption type."); s_pSecFn->DeleteSecurityContext(&sspi_context); return CURLE_COULDNT_CONNECT; @@ -483,7 +489,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, else { code = Curl_write_plain(conn, sock, (char *)sspi_send_token.pvBuffer, sspi_send_token.cbBuffer, &written); - if(code || (sspi_send_token.cbBuffer != (size_t)written)) { + if((code != CURLE_OK) || (sspi_send_token.cbBuffer != (size_t)written)) { failf(data, "Failed to send SSPI encryption type."); if(sspi_send_token.pvBuffer) s_pSecFn->FreeContextBuffer(sspi_send_token.pvBuffer); @@ -495,7 +501,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, } result = Curl_blockread_all(conn, sock, (char *)socksreq, 4, &actualread); - if(result || (actualread != 4)) { + if(result != CURLE_OK || actualread != 4) { failf(data, "Failed to receive SSPI encryption response."); s_pSecFn->DeleteSecurityContext(&sspi_context); return CURLE_COULDNT_CONNECT; @@ -529,7 +535,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, result = Curl_blockread_all(conn, sock, (char *)sspi_w_token[0].pvBuffer, sspi_w_token[0].cbBuffer, &actualread); - if(result || (actualread != us_length)) { + if(result != CURLE_OK || actualread != us_length) { failf(data, "Failed to receive SSPI encryption type."); s_pSecFn->FreeContextBuffer(sspi_w_token[0].pvBuffer); s_pSecFn->DeleteSecurityContext(&sspi_context); @@ -587,8 +593,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 gssapi data": + ((socksreq[0]==1)?" gssapi integrity":" gssapi 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 ac7447c..ea17a59 100644 --- a/lib/speedcheck.c +++ b/lib/speedcheck.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2011, Daniel Stenberg, , 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 @@ CURLcode Curl_speedcheck(struct SessionHandle *data, } else { /* wait complete low_speed_time */ - Curl_expire_latest(data, nextcheck); + Curl_expire(data, nextcheck); } } else { @@ -68,7 +68,7 @@ CURLcode Curl_speedcheck(struct SessionHandle *data, /* 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); + Curl_expire(data, data->set.low_speed_time*1000); } return CURLE_OK; } diff --git a/lib/ssh.c b/lib/ssh.c index d7e88c6..b248b43 100644 --- a/lib/ssh.c +++ b/lib/ssh.c @@ -94,9 +94,6 @@ #ifdef WIN32 # undef PATH_MAX # define PATH_MAX MAX_PATH -# ifndef R_OK -# define R_OK 4 -# endif #endif #ifndef PATH_MAX @@ -546,17 +543,6 @@ static CURLcode ssh_knownhost(struct connectdata *conn) keybit = (keytype == LIBSSH2_HOSTKEY_TYPE_RSA)? LIBSSH2_KNOWNHOST_KEY_SSHRSA:LIBSSH2_KNOWNHOST_KEY_SSHDSS; -#ifdef HAVE_LIBSSH2_KNOWNHOST_CHECKP - keycheck = libssh2_knownhost_checkp(sshc->kh, - conn->host.name, - (conn->remote_port != PORT_SSH)? - conn->remote_port:-1, - remotekey, keylen, - LIBSSH2_KNOWNHOST_TYPE_PLAIN| - LIBSSH2_KNOWNHOST_KEYENC_RAW| - keybit, - &host); -#else keycheck = libssh2_knownhost_check(sshc->kh, conn->host.name, remotekey, keylen, @@ -564,7 +550,6 @@ static CURLcode ssh_knownhost(struct connectdata *conn) LIBSSH2_KNOWNHOST_KEYENC_RAW| keybit, &host); -#endif infof(data, "SSH host check: %d, key: %s\n", keycheck, (keycheck <= LIBSSH2_KNOWNHOST_CHECK_MISMATCH)? @@ -603,10 +588,8 @@ static CURLcode ssh_knownhost(struct connectdata *conn) switch(rc) { default: /* unknown return codes will equal reject */ - /* FALLTHROUGH */ case CURLKHSTAT_REJECT: state(conn, SSH_SESSION_FREE); - /* FALLTHROUGH */ case CURLKHSTAT_DEFER: /* DEFER means bail out but keep the SSH_HOSTKEY state */ result = sshc->actualcode = CURLE_PEER_FAILED_VERIFICATION; @@ -749,7 +732,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) * whatever) is up to us. */ result = ssh_check_fingerprint(conn); - if(!result) + if(result == CURLE_OK) state(conn, SSH_AUTHLIST); /* ssh_check_fingerprint sets state appropriately on error */ break; @@ -803,7 +786,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) if((data->set.ssh_auth_types & CURLSSH_AUTH_PUBLICKEY) && (strstr(sshc->authlist, "publickey") != NULL)) { char *home = NULL; - bool out_of_memory = FALSE; + bool rsa_pub_empty_but_ok = FALSE; sshc->rsa_pub = sshc->rsa = NULL; @@ -811,55 +794,34 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) HOME environment variable etc? */ home = curl_getenv("HOME"); - if(data->set.str[STRING_SSH_PRIVATE_KEY]) - sshc->rsa = strdup(data->set.str[STRING_SSH_PRIVATE_KEY]); - else { - /* If no private key file is specified, try some common paths. */ - if(home) { - /* Try ~/.ssh first. */ - sshc->rsa = aprintf("%s/.ssh/id_rsa", home); - if(!sshc->rsa) - out_of_memory = TRUE; - else if(access(sshc->rsa, R_OK) != 0) { - Curl_safefree(sshc->rsa); - sshc->rsa = aprintf("%s/.ssh/id_dsa", home); - if(!sshc->rsa) - out_of_memory = TRUE; - else if(access(sshc->rsa, R_OK) != 0) { - Curl_safefree(sshc->rsa); - } - } - } - if(!out_of_memory && !sshc->rsa) { - /* Nothing found; try the current dir. */ - sshc->rsa = strdup("id_rsa"); - if(sshc->rsa && access(sshc->rsa, R_OK) != 0) { - Curl_safefree(sshc->rsa); - sshc->rsa = strdup("id_dsa"); - if(sshc->rsa && access(sshc->rsa, R_OK) != 0) { - Curl_safefree(sshc->rsa); - /* Out of guesses. Set to the empty string to avoid - * surprising info messages. */ - sshc->rsa = strdup(""); - } - } - } - } + if(data->set.str[STRING_SSH_PUBLIC_KEY] && + !*data->set.str[STRING_SSH_PUBLIC_KEY]) + rsa_pub_empty_but_ok = true; + else if(data->set.str[STRING_SSH_PUBLIC_KEY]) + sshc->rsa_pub = aprintf("%s", data->set.str[STRING_SSH_PUBLIC_KEY]); + else if(home) + sshc->rsa_pub = aprintf("%s/.ssh/id_dsa.pub", home); + else + /* as a final resort, try current dir! */ + sshc->rsa_pub = strdup("id_dsa.pub"); - /* - * Unless the user explicitly specifies a public key file, let - * libssh2 extract the public key from the private key file. - * This is done by simply passing sshc->rsa_pub = NULL. - */ - if(data->set.str[STRING_SSH_PUBLIC_KEY]) { - sshc->rsa_pub = strdup(data->set.str[STRING_SSH_PUBLIC_KEY]); - if(!sshc->rsa_pub) - out_of_memory = TRUE; + if(!rsa_pub_empty_but_ok && (sshc->rsa_pub == NULL)) { + Curl_safefree(home); + state(conn, SSH_SESSION_FREE); + sshc->actualcode = CURLE_OUT_OF_MEMORY; + break; } - if(out_of_memory || sshc->rsa == NULL) { + if(data->set.str[STRING_SSH_PRIVATE_KEY]) + sshc->rsa = aprintf("%s", data->set.str[STRING_SSH_PRIVATE_KEY]); + else if(home) + sshc->rsa = aprintf("%s/.ssh/id_dsa", home); + else + /* as a final resort, try current dir! */ + sshc->rsa = strdup("id_dsa"); + + if(sshc->rsa == NULL) { Curl_safefree(home); - Curl_safefree(sshc->rsa); Curl_safefree(sshc->rsa_pub); state(conn, SSH_SESSION_FREE); sshc->actualcode = CURLE_OUT_OF_MEMORY; @@ -872,8 +834,8 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) Curl_safefree(home); - infof(data, "Using SSH public key file '%s'\n", sshc->rsa_pub); - infof(data, "Using SSH private key file '%s'\n", sshc->rsa); + infof(data, "Using ssh public key file %s\n", sshc->rsa_pub); + infof(data, "Using ssh private key file %s\n", sshc->rsa); state(conn, SSH_AUTH_PKEY); } @@ -1808,8 +1770,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) break; case SSH_SFTP_CREATE_DIRS: - sshc->slash_pos = strchr(sshc->slash_pos, '/'); - if(sshc->slash_pos) { + if((sshc->slash_pos = strchr(sshc->slash_pos, '/')) != NULL) { *sshc->slash_pos = 0; infof(data, "Creating directory '%s'\n", sftp_scp->path); @@ -2037,7 +1998,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) sshc->readdir_line, sshc->readdir_currLen); - if(!result) { + if(result == CURLE_OK) { /* output debug output if that is requested */ if(data->set.verbose) { @@ -2107,14 +2068,10 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) if(rc == LIBSSH2_ERROR_EAGAIN) { break; } - else if(rc || - !(attrs.flags & LIBSSH2_SFTP_ATTR_SIZE) || - (attrs.filesize == 0)) { + else if(rc) { /* * libssh2_sftp_open() 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; @@ -2734,7 +2691,7 @@ static CURLcode ssh_block_statemach(struct connectdata *conn, } #ifdef HAVE_LIBSSH2_SESSION_BLOCK_DIRECTION - if(!result && block) { + if((CURLE_OK == result) && block) { int dir = libssh2_session_block_directions(sshc->ssh_session); curl_socket_t sock = conn->sock[FIRSTSOCKET]; curl_socket_t fd_read = CURL_SOCKET_BAD; @@ -2906,7 +2863,7 @@ static CURLcode scp_doing(struct connectdata *conn, static CURLcode ssh_do(struct connectdata *conn, bool *done) { - CURLcode result; + CURLcode res; bool connected = 0; struct SessionHandle *data = conn->data; struct ssh_conn *sshc = &conn->proto.sshc; @@ -2921,15 +2878,15 @@ static CURLcode ssh_do(struct connectdata *conn, bool *done) Curl_pgrsSetUploadCounter(data, 0); Curl_pgrsSetDownloadCounter(data, 0); - Curl_pgrsSetUploadSize(data, -1); - Curl_pgrsSetDownloadSize(data, -1); + Curl_pgrsSetUploadSize(data, 0); + Curl_pgrsSetDownloadSize(data, 0); if(conn->handler->protocol & CURLPROTO_SCP) - result = scp_perform(conn, &connected, done); + res = scp_perform(conn, &connected, done); else - result = sftp_perform(conn, &connected, done); + res = sftp_perform(conn, &connected, done); - return result; + return res; } /* BLOCKING, but the function is using the state machine so the only reason @@ -2961,7 +2918,7 @@ static CURLcode ssh_done(struct connectdata *conn, CURLcode status) CURLcode result = CURLE_OK; struct SSHPROTO *sftp_scp = conn->data->req.protop; - if(!status) { + if(status == CURLE_OK) { /* run the state-machine TODO: when the multi interface is used, this _really_ should be using @@ -2989,7 +2946,7 @@ static CURLcode scp_done(struct connectdata *conn, CURLcode status, { (void)premature; /* not used */ - if(!status) + if(status == CURLE_OK) state(conn, SSH_SCP_DONE); return ssh_done(conn, status); @@ -3087,7 +3044,8 @@ CURLcode sftp_perform(struct connectdata *conn, static CURLcode sftp_doing(struct connectdata *conn, bool *dophase_done) { - CURLcode result = ssh_multi_statemach(conn, dophase_done); + CURLcode result; + result = ssh_multi_statemach(conn, dophase_done); if(*dophase_done) { DEBUGF(infof(conn->data, "DO phase is complete\n")); @@ -3124,7 +3082,7 @@ static CURLcode sftp_done(struct connectdata *conn, CURLcode status, { struct ssh_conn *sshc = &conn->proto.sshc; - if(!status) { + if(status == CURLE_OK) { /* Post quote commands are executed after the SFTP_CLOSE state to avoid errors that could happen due to open file handles during POSTQUOTE operation */ diff --git a/lib/ssh.h b/lib/ssh.h index 1bc3348..ff2e16b 100644 --- a/lib/ssh.h +++ b/lib/ssh.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -158,34 +158,22 @@ struct ssh_conn { #ifdef USE_LIBSSH2 -/* Feature detection based on version numbers to better work with - non-configure platforms */ - #if !defined(LIBSSH2_VERSION_NUM) || (LIBSSH2_VERSION_NUM < 0x001000) # error "SCP/SFTP protocols require libssh2 0.16 or later" #endif -#if LIBSSH2_VERSION_NUM >= 0x010000 -#define HAVE_LIBSSH2_SFTP_SEEK64 1 -#endif - -#if LIBSSH2_VERSION_NUM >= 0x010100 -#define HAVE_LIBSSH2_VERSION 1 +#if defined(LIBSSH2_VERSION_NUM) && (LIBSSH2_VERSION_NUM >= 0x010000) +# define HAVE_LIBSSH2_SFTP_SEEK64 1 +#else +# undef HAVE_LIBSSH2_SFTP_SEEK64 #endif -#if LIBSSH2_VERSION_NUM >= 0x010205 -#define HAVE_LIBSSH2_INIT 1 -#define HAVE_LIBSSH2_EXIT 1 +#if defined(LIBSSH2_VERSION_NUM) && (LIBSSH2_VERSION_NUM >= 0x010206) +# define HAVE_LIBSSH2_SCP_SEND64 1 +#else +# undef HAVE_LIBSSH2_SCP_SEND64 #endif -#if LIBSSH2_VERSION_NUM >= 0x010206 -#define HAVE_LIBSSH2_KNOWNHOST_CHECKP 1 -#define HAVE_LIBSSH2_SCP_SEND64 1 -#endif - -#if LIBSSH2_VERSION_NUM >= 0x010208 -#define HAVE_LIBSSH2_SESSION_HANDSHAKE 1 -#endif extern const struct Curl_handler Curl_handler_scp; extern const struct Curl_handler Curl_handler_sftp; diff --git a/lib/strdup.c b/lib/strdup.c index a997b12..3b776b1 100644 --- a/lib/strdup.c +++ b/lib/strdup.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * 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 @@ -19,12 +19,12 @@ * KIND, either express or implied. * ***************************************************************************/ +/* + * This file is 'mem-include-scan' clean. See test 1132. + */ #include "curl_setup.h" -#include "strdup.h" -#include "curl_memory.h" -/* The last #include file should be: */ -#include "memdebug.h" +#include "strdup.h" #ifndef HAVE_STRDUP char *curlx_strdup(const char *str) @@ -50,24 +50,3 @@ char *curlx_strdup(const char *str) } #endif - -/*************************************************************************** - * - * Curl_memdup(source, length) - * - * Copies the 'source' data to a newly allocated buffer (that is - * returned). Copies 'length' bytes. - * - * Returns the new pointer or NULL on failure. - * - ***************************************************************************/ -char *Curl_memdup(const char *src, size_t length) -{ - char *buffer = malloc(length); - if(!buffer) - return NULL; /* fail */ - - memcpy(buffer, src, length); - - return buffer; -} diff --git a/lib/strdup.h b/lib/strdup.h index 23a71f8..49af911 100644 --- a/lib/strdup.h +++ b/lib/strdup.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2010, Daniel Stenberg, , 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,5 @@ #ifndef HAVE_STRDUP extern char *curlx_strdup(const char *str); #endif -char *Curl_memdup(const char *src, size_t buffer_length); #endif /* HEADER_CURL_STRDUP_H */ diff --git a/lib/strerror.c b/lib/strerror.c index 56e4385..aec6d38 100644 --- a/lib/strerror.c +++ b/lib/strerror.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2004 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 2004 - 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 @@ -105,9 +105,6 @@ curl_easy_strerror(CURLcode error) case CURLE_FTP_CANT_GET_HOST: return "FTP: can't figure out the host in the PASV response"; - case CURLE_HTTP2: - return "Error in the HTTP2 framing layer"; - case CURLE_FTP_COULDNT_SET_TYPE: return "FTP: couldn't set file type"; @@ -298,13 +295,8 @@ curl_easy_strerror(CURLcode error) case CURLE_NO_CONNECTION_AVAILABLE: return "The max connection limit is reached"; - case CURLE_SSL_PINNEDPUBKEYNOTMATCH: - return "SSL public key does not match pinned public key"; - - case CURLE_SSL_INVALIDCERTSTATUS: - return "SSL server certificate status verification FAILED"; - /* error codes not used by current libcurl */ + case CURLE_OBSOLETE16: case CURLE_OBSOLETE20: case CURLE_OBSOLETE24: case CURLE_OBSOLETE29: @@ -333,7 +325,7 @@ curl_easy_strerror(CURLcode error) */ return "Unknown error"; #else - if(!error) + if(error == CURLE_OK) return "No error"; else return "Error"; @@ -600,7 +592,7 @@ get_winsock_error (int err, char *buf, size_t len) return NULL; } #else - if(!err) + if(err == CURLE_OK) return NULL; else p = "error"; diff --git a/lib/strtoofft.h b/lib/strtoofft.h index 75c73d4..b812a67 100644 --- a/lib/strtoofft.h +++ b/lib/strtoofft.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2010, Daniel Stenberg, , 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,14 +45,7 @@ # 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 + _CRTIMP __int64 __cdecl _strtoi64(const char *, char **, int); # define curlx_strtoofft _strtoi64 # else curl_off_t curlx_strtoll(const char *nptr, char **endptr, int base); diff --git a/lib/telnet.c b/lib/telnet.c index 176e994..1f03a00 100644 --- a/lib/telnet.c +++ b/lib/telnet.c @@ -710,6 +710,7 @@ static void printsub(struct SessionHandle *data, size_t length) /* length of suboption data */ { unsigned int i = 0; + unsigned short *pval; if(data->set.verbose) { if(direction) { @@ -762,9 +763,9 @@ static void printsub(struct SessionHandle *data, switch(pointer[0]) { case CURL_TELOPT_NAWS: - if(length > 4) - infof(data, "Width: %hu ; Height: %hu", (pointer[1]<<8) | pointer[2], - (pointer[3]<<8) | pointer[4]); + pval = (unsigned short*)(pointer+1); + infof(data, "Width: %hu ; Height: %hu", + ntohs(pval[0]), ntohs(pval[1])); break; default: switch(pointer[1]) { @@ -1075,7 +1076,7 @@ CURLcode telrcv(struct connectdata *conn, CLIENTWRITE_BODY, \ (char *)&inbuf[startwrite], \ in-startwrite); \ - if(result) \ + if(result != CURLE_OK) \ return result; \ } \ startwrite = -1 @@ -1229,9 +1230,9 @@ static CURLcode send_telnet_data(struct connectdata *conn, unsigned char outbuf[2]; ssize_t bytes_written, total_written; int out_count; - CURLcode result = CURLE_OK; + CURLcode rc = CURLE_OK; - while(!result && nread--) { + while(rc == CURLE_OK && nread--) { outbuf[0] = *buffer++; out_count = 1; if(outbuf[0] == CURL_IAC) @@ -1246,20 +1247,19 @@ static CURLcode send_telnet_data(struct connectdata *conn, switch (Curl_poll(pfd, 1, -1)) { case -1: /* error, abort writing */ case 0: /* timeout (will never happen) */ - result = CURLE_SEND_ERROR; + rc = 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); + rc = 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); + /* handle partial write */ + } while(rc == CURLE_OK && total_written < out_count); } - return result; + return rc; } static CURLcode telnet_done(struct connectdata *conn, diff --git a/lib/tftp.c b/lib/tftp.c index b9723c0..e499c45 100644 --- a/lib/tftp.c +++ b/lib/tftp.c @@ -417,32 +417,32 @@ static size_t tftp_option_add(tftp_state_data_t *state, size_t csize, static CURLcode tftp_connect_for_tx(tftp_state_data_t *state, tftp_event_t event) { - CURLcode result; + CURLcode res; #ifndef CURL_DISABLE_VERBOSE_STRINGS struct SessionHandle *data = state->conn->data; infof(data, "%s\n", "Connected for transmit"); #endif state->state = TFTP_STATE_TX; - result = tftp_set_timeouts(state); - if(result) - return(result); + res = tftp_set_timeouts(state); + if(res != CURLE_OK) + return(res); return tftp_tx(state, event); } static CURLcode tftp_connect_for_rx(tftp_state_data_t *state, tftp_event_t event) { - CURLcode result; + CURLcode res; #ifndef CURL_DISABLE_VERBOSE_STRINGS struct SessionHandle *data = state->conn->data; infof(data, "%s\n", "Connected for receive"); #endif state->state = TFTP_STATE_RX; - result = tftp_set_timeouts(state); - if(result) - return(result); + res = tftp_set_timeouts(state); + if(res != CURLE_OK) + return(res); return tftp_rx(state, event); } @@ -1208,7 +1208,7 @@ static CURLcode tftp_multi_statemach(struct connectdata *conn, bool *done) } else if(event != TFTP_EVENT_NONE) { result = tftp_state_machine(state, event); - if(result) + if(result != CURLE_OK) return(result); *done = (state->state == TFTP_STATE_FIN) ? TRUE : FALSE; if(*done) @@ -1227,10 +1227,10 @@ static CURLcode tftp_multi_statemach(struct connectdata *conn, bool *done) } else if(rc != 0) { result = tftp_receive_packet(conn); - if(result) + if(result != CURLE_OK) return(result); result = tftp_state_machine(state, state->event); - if(result) + if(result != CURLE_OK) return(result); *done = (state->state == TFTP_STATE_FIN) ? TRUE : FALSE; if(*done) @@ -1286,8 +1286,8 @@ static CURLcode tftp_perform(struct connectdata *conn, bool *dophase_done) result = tftp_state_machine(state, TFTP_EVENT_INIT); - if((state->state == TFTP_STATE_FIN) || result) - return result; + if(state->state == TFTP_STATE_FIN || result != CURLE_OK) + return(result); tftp_multi_statemach(conn, dophase_done); @@ -1310,30 +1310,30 @@ static CURLcode tftp_perform(struct connectdata *conn, bool *dophase_done) static CURLcode tftp_do(struct connectdata *conn, bool *done) { - tftp_state_data_t *state; - CURLcode result; + tftp_state_data_t *state; + CURLcode code; *done = FALSE; if(!conn->proto.tftpc) { - result = tftp_connect(conn, done); - if(result) - return result; + code = tftp_connect(conn, done); + if(code) + return code; } state = (tftp_state_data_t *)conn->proto.tftpc; if(!state) return CURLE_BAD_CALLING_ORDER; - result = tftp_perform(conn, done); + code = tftp_perform(conn, done); /* If tftp_perform() returned an error, use that for return code. If it was OK, see if tftp_translate_code() has an error. */ - if(!result) + if(code == CURLE_OK) /* If we have encountered an internal tftp error, translate it. */ - result = tftp_translate_code(state->error); + code = tftp_translate_code(state->error); - return result; + return code; } static CURLcode tftp_setup_connection(struct connectdata * conn) diff --git a/lib/timeval.c b/lib/timeval.c index 769eb3c..2fd7201 100644 --- a/lib/timeval.c +++ b/lib/timeval.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * 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 @@ -32,17 +32,9 @@ struct timeval curlx_tvnow(void) ** increases monotonically and wraps once 49.7 days have elapsed. */ struct timeval now; -#if !defined(_WIN32_WINNT) || !defined(_WIN32_WINNT_VISTA) || \ - (_WIN32_WINNT < _WIN32_WINNT_VISTA) DWORD milliseconds = GetTickCount(); now.tv_sec = milliseconds / 1000; now.tv_usec = (milliseconds % 1000) * 1000; -#else - ULONGLONG milliseconds = GetTickCount64(); - now.tv_sec = (long) (milliseconds / 1000); - now.tv_usec = (long) (milliseconds % 1000) * 1000; -#endif - return now; } diff --git a/lib/transfer.c b/lib/transfer.c index 75aaedf..dc817a6 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * 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 @@ -203,7 +203,7 @@ CURLcode Curl_fillreadbuffer(struct connectdata *conn, int bytes, int *nreadp) strlen(endofline_network)); #ifdef CURL_DOES_CONVERSIONS - CURLcode result; + CURLcode res; int length; if(data->set.prefer_ascii) { /* translate the protocol and data */ @@ -213,10 +213,10 @@ CURLcode Curl_fillreadbuffer(struct connectdata *conn, int bytes, int *nreadp) /* just translate the protocol portion */ length = strlen(hexbuffer); } - result = Curl_convert_to_network(data, data->req.upload_fromhere, length); + res = Curl_convert_to_network(data, data->req.upload_fromhere, length); /* Curl_convert_to_network calls failf if unsuccessful */ - if(result) - return(result); + if(res) + return(res); #endif /* CURL_DOES_CONVERSIONS */ if((nread - hexlen) == 0) @@ -227,11 +227,11 @@ CURLcode Curl_fillreadbuffer(struct connectdata *conn, int bytes, int *nreadp) } #ifdef CURL_DOES_CONVERSIONS else if((data->set.prefer_ascii) && (!sending_http_headers)) { - CURLcode result; - result = Curl_convert_to_network(data, data->req.upload_fromhere, nread); + CURLcode res; + res = Curl_convert_to_network(data, data->req.upload_fromhere, nread); /* Curl_convert_to_network calls failf if unsuccessful */ - if(result) - return result; + if(res != CURLE_OK) + return(res); } #endif /* CURL_DOES_CONVERSIONS */ @@ -547,18 +547,6 @@ static CURLcode readwrite_data(struct SessionHandle *data, if(data->state.resume_from && !k->content_range && (data->set.httpreq==HTTPREQ_GET) && !k->ignorebody) { - - if(k->size == data->state.resume_from) { - /* The resume point is at the end of file, consider this fine - even if it doesn't allow resume from here. */ - infof(data, "The entire document is already downloaded"); - connclose(conn, "already downloaded"); - /* Abort download */ - k->keepon &= ~KEEP_RECV; - *done = TRUE; - return CURLE_OK; - } - /* we wanted to resume a download, although the server doesn't * seem to support this and we did this with a GET (if it * wasn't a GET we did a POST or PUT resume) */ @@ -903,6 +891,15 @@ static CURLcode readwrite_upload(struct SessionHandle *data, /* store number of bytes available for upload */ data->req.upload_present = nread; +#ifndef CURL_DISABLE_SMTP + if(conn->handler->protocol & PROTO_FAMILY_SMTP) { + result = Curl_smtp_escape_eob(conn, nread); + if(result) + return result; + } + else +#endif /* CURL_DISABLE_SMTP */ + /* convert LF to CRLF if so asked */ if((!sending_http_headers) && ( #ifdef CURL_DO_LINEEND_CONV @@ -910,16 +907,12 @@ static CURLcode readwrite_upload(struct SessionHandle *data, (data->set.prefer_ascii) || #endif (data->set.crlf))) { - /* Do we need to allocate a scratch buffer? */ - if(!data->state.scratch) { - data->state.scratch = malloc(2 * BUFSIZE); - if(!data->state.scratch) { - failf(data, "Failed to alloc scratch buffer!"); - - return CURLE_OUT_OF_MEMORY; - } + if(data->state.scratch == NULL) + data->state.scratch = malloc(2*BUFSIZE); + if(data->state.scratch == NULL) { + failf (data, "Failed to alloc scratch buffer!"); + return CURLE_OUT_OF_MEMORY; } - /* * ASCII/EBCDIC Note: This is presumably a text (not binary) * transfer so the data should already be in ASCII. @@ -939,7 +932,6 @@ static CURLcode readwrite_upload(struct SessionHandle *data, else data->state.scratch[si] = data->req.upload_fromhere[i]; } - if(si != nread) { /* only perform the special operation if we really did replace anything */ @@ -952,14 +944,6 @@ static CURLcode readwrite_upload(struct SessionHandle *data, data->req.upload_present = nread; } } - -#ifndef CURL_DISABLE_SMTP - if(conn->handler->protocol & PROTO_FAMILY_SMTP) { - result = Curl_smtp_escape_eob(conn, nread); - if(result) - return result; - } -#endif /* CURL_DISABLE_SMTP */ } /* if 0 == data->req.upload_present */ else { /* We have a partial buffer left from a previous "round". Use @@ -1218,10 +1202,10 @@ int Curl_single_getsock(const struct connectdata *conn, if((data->req.keepon & KEEP_SENDBITS) == KEEP_SEND) { if((conn->sockfd != conn->writesockfd) || - bitmap == GETSOCK_BLANK) { - /* only if they are not the same socket and we have a readable + !(data->req.keepon & KEEP_RECV)) { + /* only if they are not the same socket or we didn't have a readable one, we increase index */ - if(bitmap != GETSOCK_BLANK) + if(data->req.keepon & KEEP_RECV) sockindex++; /* increase index if we need two entries */ DEBUGASSERT(conn->writesockfd != CURL_SOCKET_BAD); @@ -1294,7 +1278,7 @@ long Curl_sleep_time(curl_off_t rate_bps, curl_off_t cur_rate_bps, */ CURLcode Curl_pretransfer(struct SessionHandle *data) { - CURLcode result; + CURLcode res; if(!data->change.url) { /* we can't do anything without URL */ failf(data, "No URL set!"); @@ -1304,15 +1288,17 @@ CURLcode Curl_pretransfer(struct SessionHandle *data) /* 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 before any transfer takes place. */ - result = Curl_ssl_initsessions(data, data->set.ssl.max_ssl_sessions); - if(result) - return result; + res = Curl_ssl_initsessions(data, data->set.ssl.max_ssl_sessions); + if(res) + return res; 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 */ + data->state.ssl_connect_retry = FALSE; + data->state.authproblem = FALSE; data->state.authhost.want = data->set.httpauth; data->state.authproxy.want = data->set.proxyauth; @@ -1325,9 +1311,9 @@ CURLcode Curl_pretransfer(struct SessionHandle *data) /* If there is a list of host pairs to deal with */ if(data->change.resolve) - result = Curl_loadhostpairs(data); + res = Curl_loadhostpairs(data); - if(!result) { + if(!res) { /* Allow data->set.use_port to set which port to use. This needs to be * disabled for example when we follow Location: headers to URLs using * different ports! */ @@ -1342,7 +1328,6 @@ CURLcode Curl_pretransfer(struct SessionHandle *data) #endif Curl_initinfo(data); /* reset session-specific information "variables" */ - Curl_pgrsResetTimesSizes(data); Curl_pgrsStartNow(data); if(data->set.timeout) @@ -1358,7 +1343,7 @@ CURLcode Curl_pretransfer(struct SessionHandle *data) data->state.authproxy.picked &= data->state.authproxy.want; } - return result; + return res; } /* @@ -1843,13 +1828,13 @@ Curl_reconnect_request(struct connectdata **connp) * (again). Slight Lack of feedback in the report, but I don't think this * extra check can do much harm. */ - if(!result || (CURLE_SEND_ERROR == result)) { + if((CURLE_OK == result) || (CURLE_SEND_ERROR == result)) { bool async; bool protocol_done = TRUE; /* Now, redo the connect and get a new connection */ result = Curl_connect(data, connp, &async, &protocol_done); - if(!result) { + if(CURLE_OK == result) { /* We have connected or sent away a name resolve query fine */ conn = *connp; /* setup conn to again point to something nice */ @@ -1887,10 +1872,12 @@ CURLcode Curl_retry_request(struct connectdata *conn, !(conn->handler->protocol&(PROTO_FAMILY_HTTP|CURLPROTO_RTSP))) return CURLE_OK; - if((data->req.bytecount + data->req.headerbytecount == 0) && - conn->bits.reuse && - !data->set.opt_no_body && - (data->set.rtspreq != RTSPREQ_RECEIVE)) { + if(/* workaround for broken TLS servers */ data->state.ssl_connect_retry || + ((data->req.bytecount + + data->req.headerbytecount == 0) && + conn->bits.reuse && + !data->set.opt_no_body && + data->set.rtspreq != RTSPREQ_RECEIVE)) { /* We got no data, we attempted to re-use a connection and yet we want a "body". This might happen if the connection was left alive when we were done using it before, but that was closed when we wanted to read from diff --git a/lib/url.c b/lib/url.c index 6245d82..1d05975 100644 --- a/lib/url.c +++ b/lib/url.c @@ -47,10 +47,6 @@ #include #endif -#ifdef HAVE_SYS_UN_H -#include -#endif - #ifndef HAVE_SOCKET #error "We can't compile without socket() support!" #endif @@ -129,7 +125,6 @@ int curl_win32_idn_to_ascii(const char *in, char **out); #include "multihandle.h" #include "pipeline.h" #include "dotdot.h" -#include "strdup.h" #define _MPRINTF_REPLACE /* use our functions only */ #include @@ -220,15 +215,6 @@ static const struct Curl_handler * const protocols[] = { #endif #endif -#if !defined(CURL_DISABLE_SMB) && defined(USE_NTLM) && \ - (CURL_SIZEOF_CURL_OFF_T > 4) && \ - (!defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO)) - &Curl_handler_smb, -#ifdef USE_SSL - &Curl_handler_smbs, -#endif -#endif - #ifndef CURL_DISABLE_SMTP &Curl_handler_smtp, #ifdef USE_SSL @@ -284,9 +270,8 @@ void Curl_freeset(struct SessionHandle *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]); - } if(data->change.referer_alloc) { Curl_safefree(data->change.referer); @@ -360,7 +345,7 @@ static CURLcode setstropt_userpwd(char *option, char **userp, char **passwdp) CURLcode Curl_dupset(struct SessionHandle *dst, struct SessionHandle *src) { - CURLcode result = CURLE_OK; + CURLcode r = CURLE_OK; enum dupstring i; /* Copy src->set into dst->set first, then deal with the strings @@ -371,25 +356,14 @@ CURLcode Curl_dupset(struct SessionHandle *dst, struct SessionHandle *src) 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]; + for(i=(enum dupstring)0; i< STRING_LAST; i++) { + r = setstropt(&dst->set.str[i], src->set.str[i]); + if(r != CURLE_OK) + break; } - return CURLE_OK; + /* If a failure occurred, freeing has to be performed externally. */ + return r; } /* @@ -450,12 +424,6 @@ CURLcode Curl_close(struct SessionHandle *data) Curl_safefree(data->state.scratch); Curl_ssl_free_certinfo(data); - /* Cleanup possible redirect junk */ - if(data->req.newurl) { - free(data->req.newurl); - data->req.newurl = NULL; - } - if(data->change.referer_alloc) { Curl_safefree(data->change.referer); data->change.referer_alloc = FALSE; @@ -500,7 +468,7 @@ CURLcode Curl_close(struct SessionHandle *data) */ CURLcode Curl_init_userdefined(struct UserDefined *set) { - CURLcode result = CURLE_OK; + CURLcode res = CURLE_OK; set->out = stdout; /* default output to stdout */ set->in = stdin; /* default input from stdin */ @@ -566,9 +534,8 @@ CURLcode Curl_init_userdefined(struct UserDefined *set) define since we internally only use the lower 16 bits for the passed in bitmask to not conflict with the private bits */ set->allowed_protocols = CURLPROTO_ALL; - set->redir_protocols = CURLPROTO_ALL & /* All except FILE, SCP and SMB */ - ~(CURLPROTO_FILE | CURLPROTO_SCP | CURLPROTO_SMB | - CURLPROTO_SMBS); + set->redir_protocols = + CURLPROTO_ALL & ~(CURLPROTO_FILE|CURLPROTO_SCP); /* not FILE or SCP */ #if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) /* @@ -576,18 +543,18 @@ CURLcode Curl_init_userdefined(struct UserDefined *set) * seem not to follow rfc1961 section 4.3/4.4 */ set->socks5_gssapi_nec = FALSE; - /* set default GSS-API service name */ - result = setstropt(&set->str[STRING_SOCKS5_GSSAPI_SERVICE], - (char *) CURL_DEFAULT_SOCKS5_GSSAPI_SERVICE); - if(result) - return result; + /* set default gssapi service name */ + res = setstropt(&set->str[STRING_SOCKS5_GSSAPI_SERVICE], + (char *) CURL_DEFAULT_SOCKS5_GSSAPI_SERVICE); + if(res != CURLE_OK) + return res; #endif /* This is our preferred CA cert bundle/path since install time */ #if defined(CURL_CA_BUNDLE) - result = setstropt(&set->str[STRING_SSL_CAFILE], (char *) CURL_CA_BUNDLE); + res = setstropt(&set->str[STRING_SSL_CAFILE], (char *) CURL_CA_BUNDLE); #elif defined(CURL_CA_PATH) - result = setstropt(&set->str[STRING_SSL_CAPATH], (char *) CURL_CA_PATH); + res = setstropt(&set->str[STRING_SSL_CAPATH], (char *) CURL_CA_PATH); #endif set->wildcardmatch = FALSE; @@ -605,8 +572,7 @@ CURLcode Curl_init_userdefined(struct UserDefined *set) set->ssl_enable_alpn = TRUE; set->expect_100_timeout = 1000L; /* Wait for a second by default. */ - set->sep_headers = TRUE; /* separated header lists by default */ - return result; + return res; } /** @@ -619,8 +585,9 @@ CURLcode Curl_init_userdefined(struct UserDefined *set) CURLcode Curl_open(struct SessionHandle **curl) { - CURLcode result; + CURLcode res = CURLE_OK; struct SessionHandle *data; + CURLcode status; /* Very simple start-up: alloc the struct, init it with zeroes and return */ data = calloc(1, sizeof(struct SessionHandle)); @@ -632,11 +599,11 @@ CURLcode Curl_open(struct SessionHandle **curl) data->magic = CURLEASY_MAGIC_NUMBER; - result = Curl_resolver_init(&data->state.resolver); - if(result) { + status = Curl_resolver_init(&data->state.resolver); + if(status) { DEBUGF(fprintf(stderr, "Error: resolver_init failed\n")); free(data); - return result; + return status; } /* We do some initial setup here, all those fields that can't be just 0 */ @@ -644,10 +611,10 @@ CURLcode Curl_open(struct SessionHandle **curl) data->state.headerbuff = malloc(HEADERSIZE); if(!data->state.headerbuff) { DEBUGF(fprintf(stderr, "Error: malloc of headerbuff failed\n")); - result = CURLE_OUT_OF_MEMORY; + res = CURLE_OUT_OF_MEMORY; } else { - result = Curl_init_userdefined(&data->set); + res = Curl_init_userdefined(&data->set); data->state.headersize=HEADERSIZE; @@ -665,7 +632,7 @@ CURLcode Curl_open(struct SessionHandle **curl) data->set.maxconnects = DEFAULT_CONNCACHE_SIZE; /* for easy handles */ } - if(result) { + if(res) { Curl_resolver_cleanup(data->state.resolver); if(data->state.headerbuff) free(data->state.headerbuff); @@ -676,7 +643,7 @@ CURLcode Curl_open(struct SessionHandle **curl) else *curl = data; - return result; + return res; } CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, @@ -771,7 +738,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, break; case CURLOPT_FAILONERROR: /* - * Don't output the >=400 error code HTML-page, but instead only + * Don't output the >=300 error code HTML-page, but instead only * return error. */ data->set.http_fail_on_error = (0 != va_arg(param, long))?TRUE:FALSE; @@ -1166,8 +1133,6 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, /* * 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 *)); @@ -1175,12 +1140,8 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, * 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; - } + data->cookies = Curl_cookie_init(data, NULL, data->cookies, + data->set.cookiesession); break; case CURLOPT_COOKIESESSION: @@ -1224,20 +1185,14 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, /* flush cookies to file, takes care of the locking */ Curl_flush_cookies(data, 0); } - else if(Curl_raw_equal(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) { + if(!argptr) { result = CURLE_OUT_OF_MEMORY; - Curl_safefree(argptr); } else { Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE); @@ -1312,9 +1267,9 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, #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 */ +#ifndef USE_HTTP_NEGOTIATE + auth &= ~CURLAUTH_GSSNEGOTIATE; /* no GSS-Negotiate without GSSAPI or + WINDOWS_SSPI */ #endif /* check if any auth bit lower than CURLAUTH_ONLY is still set */ @@ -1400,9 +1355,9 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, #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 */ +#ifndef USE_HTTP_NEGOTIATE + auth &= ~CURLAUTH_GSSNEGOTIATE; /* no GSS-Negotiate without GSSAPI or + WINDOWS_SSPI */ #endif /* check if any auth bit lower than CURLAUTH_ONLY is still set */ @@ -1464,7 +1419,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, #if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) case CURLOPT_SOCKS5_GSSAPI_SERVICE: /* - * Set GSS-API service name + * Set gssapi service name */ result = setstropt(&data->set.str[STRING_SOCKS5_GSSAPI_SERVICE], va_arg(param, char *)); @@ -1532,7 +1487,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, data->set.ftp_skip_ip = (0 != va_arg(param, long))?TRUE:FALSE; break; - case CURLOPT_READDATA: + case CURLOPT_INFILE: /* * FILE pointer to read the file to be uploaded from. Or possibly * used as argument to the read callback. @@ -1970,7 +1925,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, break; case CURLOPT_GSSAPI_DELEGATION: /* - * GSS-API credential delegation + * GSSAPI credential delegation */ data->set.gssapi_delegation = va_arg(param, long); break; @@ -1998,52 +1953,30 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, data->set.ssl.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.verifystatus = (0 != va_arg(param, long))?TRUE:FALSE; - break; +#ifdef USE_SSLEAY + /* since these two options are only possible to use on an OpenSSL- + powered libcurl we #ifdef them on this condition so that libcurls + built against other SSL libs will return a proper error when trying + to set this option! */ 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; +#endif +#if defined(USE_SSLEAY) || defined(USE_QSOSSL) || defined(USE_GSKIT) || \ + defined(USE_NSS) 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: - /* - * 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], - va_arg(param, char *)); break; +#endif case CURLOPT_CAINFO: /* * Set CA info for SSL connection. Specify file name of the CA certificate @@ -2052,7 +1985,6 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, 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. @@ -2060,9 +1992,6 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, /* This does not work on windows. */ result = setstropt(&data->set.str[STRING_SSL_CAPATH], va_arg(param, char *)); -#else - result = CURLE_NOT_BUILT_IN; -#endif break; case CURLOPT_CRLFILE: /* @@ -2381,7 +2310,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, * 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)); + data->set.scope = curlx_sltoui(va_arg(param, long)); break; case CURLOPT_PROTOCOLS: @@ -2598,13 +2527,6 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, data->set.ssl_enable_alpn = (0 != va_arg(param, long))?TRUE:FALSE; break; -#ifdef USE_UNIX_SOCKETS - case CURLOPT_UNIX_SOCKET_PATH: - result = setstropt(&data->set.str[STRING_UNIX_SOCKET_PATH], - va_arg(param, char *)); - break; -#endif - default: /* unknown tag and its companion, just ignore: */ result = CURLE_UNKNOWN_OPTION; @@ -2637,8 +2559,7 @@ static void conn_free(struct connectdata *conn) 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) +#if defined(USE_NTLM) && defined(NTLM_WB_ENABLED) Curl_ntlm_wb_cleanup(conn); #endif @@ -2675,16 +2596,6 @@ static void conn_free(struct connectdata *conn) free(conn); /* free all the connection oriented data */ } -/* - * Disconnects the given connection. Note the connection may not be the - * primary connection, like when freeing room in the connection cache or - * killing of a dead old connection. - * - * This function MUST NOT reset state in the SessionHandle struct if that - * isn't strictly bound to the life-time of *this* particular connection. - * - */ - CURLcode Curl_disconnect(struct connectdata *conn, bool dead_connection) { struct SessionHandle *data; @@ -2704,10 +2615,38 @@ CURLcode Curl_disconnect(struct connectdata *conn, bool dead_connection) Curl_hostcache_prune(data); /* kill old DNS cache entries */ -#if !defined(CURL_DISABLE_HTTP) && defined(USE_NTLM) + { + int has_host_ntlm = (conn->ntlm.state != NTLMSTATE_NONE); + int has_proxy_ntlm = (conn->proxyntlm.state != NTLMSTATE_NONE); + + /* Authentication data is a mix of connection-related and sessionhandle- + related stuff. NTLM is connection-related so when we close the shop + we shall forget. */ + + if(has_host_ntlm) { + data->state.authhost.done = FALSE; + data->state.authhost.picked = + data->state.authhost.want; + } + + if(has_proxy_ntlm) { + data->state.authproxy.done = FALSE; + data->state.authproxy.picked = + data->state.authproxy.want; + } + + if(has_host_ntlm || has_proxy_ntlm) + data->state.authproblem = FALSE; + } + /* Cleanup NTLM connection-related data */ Curl_http_ntlm_cleanup(conn); -#endif + + /* Cleanup possible redirect junk */ + if(data->req.newurl) { + free(data->req.newurl); + data->req.newurl = NULL; + } if(conn->handler->disconnect) /* This is set if protocol-specific cleanups should be made */ @@ -2746,6 +2685,8 @@ CURLcode Curl_disconnect(struct connectdata *conn, bool dead_connection) conn_free(conn); + Curl_speedinit(data); + return CURLE_OK; } @@ -2972,69 +2913,6 @@ find_oldest_idle_connection_in_bundle(struct SessionHandle *data, } /* - * This function checks if given connection is dead and disconnects if so. - * (That also removes it from the connection cache.) - * - * Returns TRUE if the connection actually was dead and disconnected. - */ -static bool disconnect_if_dead(struct connectdata *conn, - struct SessionHandle *data) -{ - 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 - 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); - return TRUE; - } - } - return FALSE; -} - -/* - * Wrapper to use disconnect_if_dead() function in Curl_conncache_foreach() - * - * Returns always 0. - */ -static int call_disconnect_if_dead(struct connectdata *conn, - void *param) -{ - struct SessionHandle* data = (struct SessionHandle*)param; - disconnect_if_dead(conn, data); - return 0; /* continue iteration */ -} - -/* - * This function scans the connection cache for half-open/dead connections, - * closes and removes them. - * The cleanup is done at most once per second. - */ -static void prune_dead_connections(struct SessionHandle *data) -{ - struct timeval now = Curl_tvnow(); - long elapsed = Curl_tvdiff(now, data->state.conn_cache->last_cleanup); - - if(elapsed >= 1000L) { - Curl_conncache_foreach(data->state.conn_cache, data, - call_disconnect_if_dead); - data->state.conn_cache->last_cleanup = now; - } -} - -/* * Given one filled in connection struct (named needle), this function should * detect if there already is one that has all the significant details * exactly the same and thus should be used instead. @@ -3088,9 +2966,7 @@ ConnectionExists(struct SessionHandle *data, curr = bundle->conn_list->head; while(curr) { bool match = FALSE; -#if defined(USE_NTLM) bool credentialsMatch = FALSE; -#endif size_t pipeLen; /* @@ -3100,11 +2976,30 @@ ConnectionExists(struct SessionHandle *data, check = curr->ptr; curr = curr->next; - if(disconnect_if_dead(check, data)) - continue; - pipeLen = check->send_pipe->size + check->recv_pipe->size; + if(!pipeLen && !check->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(check->handler->protocol & CURLPROTO_RTSP) + /* RTSP is a special case due to RTP interleaving */ + dead = Curl_rtsp_connisdead(check); + else + dead = SocketIsDead(check->sock[FIRSTSOCKET]); + + if(dead) { + check->data = data; + infof(data, "Connection %ld seems to be dead!\n", + check->connection_id); + + /* disconnect resources */ + Curl_disconnect(check, /* dead_connection */ TRUE); + continue; + } + } + if(canPipeline) { /* Make sure the pipe has only GET requests */ struct SessionHandle* sh = gethandleathead(check->send_pipe); @@ -3196,7 +3091,7 @@ ConnectionExists(struct SessionHandle *data, } if((!(needle->handler->flags & PROTOPT_CREDSPERREQUEST)) || - (wantNTLMhttp || check->ntlm.state != NTLMSTATE_NONE)) { + wantNTLMhttp) { /* This protocol requires credentials per connection or is HTTP+NTLM, so verify that we're using the same name and password as well */ if(!strequal(needle->user, check->user) || @@ -3204,9 +3099,7 @@ ConnectionExists(struct SessionHandle *data, /* one of them was different */ continue; } -#if defined(USE_NTLM) credentialsMatch = TRUE; -#endif } if(!needle->bits.httpproxy || needle->handler->flags&PROTOPT_SSL || @@ -3258,7 +3151,6 @@ ConnectionExists(struct SessionHandle *data, } if(match) { -#if defined(USE_NTLM) /* If we are looking for an HTTP+NTLM connection, check if this is already authenticating with the right credentials. If not, keep looking so that we can reuse NTLM connections if @@ -3277,7 +3169,6 @@ ConnectionExists(struct SessionHandle *data, chosen = check; continue; } -#endif if(canPipeline) { /* We can pipeline if we want to. Let's continue looking for @@ -3614,7 +3505,7 @@ static void fix_hostname(struct SessionHandle *data, host->dispname = host->name; len = strlen(host->name); - if(len && (host->name[len-1] == '.')) + if(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; @@ -3736,8 +3627,7 @@ static struct connectdata *allocate_conn(struct SessionHandle *data) conn->ip_version = data->set.ipver; -#if !defined(CURL_DISABLE_HTTP) && defined(USE_NTLM) && \ - defined(NTLM_WB_ENABLED) +#if defined(USE_NTLM) && defined(NTLM_WB_ENABLED) conn->ntlm_auth_hlpr_socket = CURL_SOCKET_BAD; conn->ntlm_auth_hlpr_pid = 0; conn->challenge_header = NULL; @@ -3827,7 +3717,7 @@ static CURLcode findprotocol(struct SessionHandle *data, /* The protocol was not found in the table, but we don't have to assign it to anything since it is already assigned to a dummy-struct in the create_conn() function when the connectdata struct is allocated. */ - failf(data, "Protocol \"%s\" not supported or disabled in " LIBCURL_NAME, + failf(data, "Protocol %s not supported or disabled in " LIBCURL_NAME, protostr); return CURLE_UNSUPPORTED_PROTOCOL; @@ -3854,13 +3744,6 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data, *prot_missing = FALSE; - /* We might pass the entire URL into the request so we need to make sure - * there are no bad characters in there.*/ - if(strpbrk(data->change.url, "\r\n")) { - failf(data, "Illegal characters found in URL"); - return CURLE_URL_MALFORMAT; - } - /************************************************************* * Parse the URL. * @@ -4092,7 +3975,7 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data, * the host name */ result = parse_url_login(data, conn, userp, passwdp, optionsp); - if(result) + if(result != CURLE_OK) return result; if(conn->host.name[0] == '[') { @@ -4113,7 +3996,7 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data, /* The address scope was well formed. Knock it out of the hostname. */ memmove(percent, endp, strlen(endp)+1); - conn->scope_id = (unsigned int)scope; + conn->scope = (unsigned int)scope; } else { /* Zone identifier is not numeric */ @@ -4135,11 +4018,11 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data, } } if(scopeidx > 0) { - char *p = percent + identifier_offset + strlen(ifname); - /* Remove zone identifier from hostname */ - memmove(percent, p, strlen(p) + 1); - conn->scope_id = scopeidx; + memmove(percent, + percent + identifier_offset + strlen(ifname), + identifier_offset + strlen(ifname)); + conn->scope = scopeidx; } else #endif /* HAVE_NET_IF_H && IFNAMSIZ */ @@ -4148,9 +4031,9 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data, } } - if(data->set.scope_id) + if(data->set.scope) /* Override any scope that was set above. */ - conn->scope_id = data->set.scope_id; + conn->scope = data->set.scope; /* Remove the fragment part of the path. Per RFC 2396, this is always the last part of the URI. We are looking for the first '#' so that we deal @@ -4242,7 +4125,7 @@ static CURLcode setup_connection_internals(struct connectdata *conn) if(p->setup_connection) { result = (*p->setup_connection)(conn); - if(result) + if(result != CURLE_OK) return result; p = conn->handler; /* May have changed. */ @@ -4416,8 +4299,9 @@ static char *detect_proxy(struct connectdata *conn) prox=curl_getenv(proxy_env); } - if(prox) + if(prox && *prox) { /* don't count "" strings */ proxy = prox; /* use this */ + } else { proxy = curl_getenv("all_proxy"); /* default proxy to use */ if(!proxy) @@ -4477,12 +4361,13 @@ static CURLcode parse_proxy(struct SessionHandle *data, /* Is there a username and password given in this proxy url? */ atsign = strchr(proxyptr, '@'); if(atsign) { + CURLcode res = CURLE_OK; char *proxyuser = NULL; char *proxypasswd = NULL; - CURLcode result = - parse_login_details(proxyptr, atsign - proxyptr, - &proxyuser, &proxypasswd, NULL); - if(!result) { + + res = parse_login_details(proxyptr, atsign - proxyptr, + &proxyuser, &proxypasswd, NULL); + if(!res) { /* found user and password, rip them out. note that we are unescaping them, as there is otherwise no way to have a username or password with reserved characters like ':' in @@ -4494,7 +4379,7 @@ static CURLcode parse_proxy(struct SessionHandle *data, conn->proxyuser = strdup(""); if(!conn->proxyuser) - result = CURLE_OUT_OF_MEMORY; + res = CURLE_OUT_OF_MEMORY; else { Curl_safefree(conn->proxypasswd); if(proxypasswd && strlen(proxypasswd) < MAX_CURL_PASSWORD_LENGTH) @@ -4503,22 +4388,25 @@ static CURLcode parse_proxy(struct SessionHandle *data, conn->proxypasswd = strdup(""); if(!conn->proxypasswd) - result = CURLE_OUT_OF_MEMORY; + res = CURLE_OUT_OF_MEMORY; } - if(!result) { + if(!res) { conn->bits.proxy_user_passwd = TRUE; /* enable it */ atsign++; /* the right side of the @-letter */ - proxyptr = atsign; /* now use this instead */ + if(atsign) + proxyptr = atsign; /* now use this instead */ + else + res = CURLE_OUT_OF_MEMORY; } } Curl_safefree(proxyuser); Curl_safefree(proxypasswd); - if(result) - return result; + if(res) + return res; } /* start scanning for port number at this point */ @@ -4679,7 +4567,7 @@ static CURLcode parse_url_login(struct SessionHandle *data, /* We could use the login information in the URL so extract it */ result = parse_login_details(login, ptr - login - 1, &userp, &passwdp, &optionsp); - if(result) + if(result != CURLE_OK) goto out; if(userp) { @@ -5106,32 +4994,6 @@ static CURLcode resolve_server(struct SessionHandle *data, /* set a pointer to the hostname we display */ fix_hostname(data, conn, &conn->host); -#ifdef USE_UNIX_SOCKETS - if(data->set.str[STRING_UNIX_SOCKET_PATH]) { - /* Unix domain sockets are local. The host gets ignored, just use the - * specified domain socket address. Do not cache "DNS entries". There is - * no DNS involved and we already have the filesystem path available */ - const char *path = data->set.str[STRING_UNIX_SOCKET_PATH]; - - hostaddr = calloc(1, sizeof(struct Curl_dns_entry)); - if(!hostaddr) - result = CURLE_OUT_OF_MEMORY; - else if((hostaddr->addr = Curl_unix2addr(path)) != NULL) - hostaddr->inuse++; - else { - /* Long paths are not supported for now */ - if(strlen(path) >= sizeof(((struct sockaddr_un *)0)->sun_path)) { - failf(data, "Unix socket path too long: '%s'", path); - result = CURLE_COULDNT_RESOLVE_HOST; - } - else - result = CURLE_OUT_OF_MEMORY; - free(hostaddr); - hostaddr = NULL; - } - } - else -#endif if(!conn->proxy.name || !*conn->proxy.name) { /* If not connecting via a proxy, extract the port from the URL, if it is * there, thus overriding any defaults that might have been set above. */ @@ -5360,7 +5222,7 @@ static CURLcode create_conn(struct SessionHandle *data, result = parseurlandfillconn(data, conn, &prot_missing, &user, &passwd, &options); - if(result) + if(result != CURLE_OK) goto out; /************************************************************* @@ -5420,7 +5282,7 @@ static CURLcode create_conn(struct SessionHandle *data, *************************************************************/ if(conn->bits.proxy_user_passwd) { result = parse_proxy_auth(data, conn); - if(result) + if(result != CURLE_OK) goto out; } @@ -5447,13 +5309,6 @@ static CURLcode create_conn(struct SessionHandle *data, else if(!proxy) proxy = detect_proxy(conn); -#ifdef USE_UNIX_SOCKETS - if(proxy && data->set.str[STRING_UNIX_SOCKET_PATH]) { - free(proxy); /* Unix domain sockets cannot be proxied, so disable it */ - 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 */ @@ -5514,16 +5369,16 @@ static CURLcode create_conn(struct SessionHandle *data, * Figure out the remote port number and fix it in the URL *************************************************************/ result = parse_remote_port(data, conn); - if(result) + if(result != CURLE_OK) goto out; /* Check for overridden login details and set them accordingly so they they are known when protocol->setup_connection is called! */ result = override_login(data, conn, &user, &passwd, &options); - if(result) + if(result != CURLE_OK) goto out; result = set_login(conn, user, passwd, options); - if(result) + if(result != CURLE_OK) goto out; /************************************************************* @@ -5531,7 +5386,7 @@ static CURLcode create_conn(struct SessionHandle *data, * we figured out what/if proxy to use. *************************************************************/ result = setup_connection_internals(conn); - if(result) + if(result != CURLE_OK) goto out; conn->recv[FIRSTSOCKET] = Curl_recv_plain; @@ -5551,7 +5406,7 @@ static CURLcode create_conn(struct SessionHandle *data, result = conn->handler->connect_it(conn, &done); /* Setup a "faked" transfer that'll do nothing */ - if(!result) { + if(CURLE_OK == result) { conn->data = data; conn->bits.tcpconnect[FIRSTSOCKET] = TRUE; /* we are "connected */ @@ -5605,8 +5460,6 @@ static CURLcode create_conn(struct SessionHandle *data, goto out; } - prune_dead_connections(data); - /************************************************************* * Check the current list of connections to see if we can * re-use an already existing one or if we have to create a @@ -5718,23 +5571,6 @@ static CURLcode create_conn(struct SessionHandle *data, */ ConnectionStore(data, conn); } - -#if defined(USE_NTLM) - /* If NTLM is requested in a part of this connection, make sure we don't - assume the state is fine as this is a fresh connection and NTLM is - connection based. */ - if((data->state.authhost.picked & (CURLAUTH_NTLM | CURLAUTH_NTLM_WB)) && - data->state.authhost.done) { - infof(data, "NTLM picked AND auth done set, clear picked!\n"); - data->state.authhost.picked = CURLAUTH_NONE; - } - - if((data->state.authproxy.picked & (CURLAUTH_NTLM | CURLAUTH_NTLM_WB)) && - data->state.authproxy.done) { - infof(data, "NTLM-proxy picked AND auth done set, clear picked!\n"); - data->state.authproxy.picked = CURLAUTH_NONE; - } -#endif } /* Mark the connection as used */ @@ -5866,14 +5702,14 @@ CURLcode Curl_connect(struct SessionHandle *data, bool *asyncp, bool *protocol_done) { - CURLcode result; + CURLcode code; *asyncp = FALSE; /* assume synchronous resolves by default */ /* call the stuff that needs to be called */ - result = create_conn(data, in_connect, asyncp); + code = create_conn(data, in_connect, asyncp); - if(!result) { + if(CURLE_OK == code) { /* no error */ if((*in_connect)->send_pipe->size || (*in_connect)->recv_pipe->size) /* pipelining */ @@ -5882,23 +5718,23 @@ CURLcode Curl_connect(struct SessionHandle *data, /* DNS resolution is done: that's either because this is a reused connection, in which case DNS was unnecessary, or because DNS really did finish already (synch resolver/fast async resolve) */ - result = Curl_setup_conn(*in_connect, protocol_done); + code = Curl_setup_conn(*in_connect, protocol_done); } } - if(result == CURLE_NO_CONNECTION_AVAILABLE) { + if(code == CURLE_NO_CONNECTION_AVAILABLE) { *in_connect = NULL; - return result; + return code; } - if(result && *in_connect) { + if(code && *in_connect) { /* We're not allowed to return failure with memory left allocated in the connectdata struct, free those here */ Curl_disconnect(*in_connect, FALSE); /* close the connection */ *in_connect = NULL; /* return a NULL */ } - return result; + return code; } CURLcode Curl_done(struct connectdata **connp, @@ -5977,8 +5813,7 @@ CURLcode Curl_done(struct connectdata **connp, } /* 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 - place in a NTLM authentication handshake + forced us to close this no matter what we think. if conn->bits.close is TRUE, it means that the connection should be closed in spite of all our efforts to be nice, due to protocol @@ -5990,13 +5825,7 @@ CURLcode Curl_done(struct connectdata **connp, we can add code that keep track of if we really must close it here or not, but currently we have no such detail knowledge. */ - - if((data->set.reuse_forbid -#if defined(USE_NTLM) - && !(conn->ntlm.state == NTLMSTATE_TYPE2 || - conn->proxyntlm.state == NTLMSTATE_TYPE2) -#endif - ) || conn->bits.close || premature) { + if(data->set.reuse_forbid || conn->bits.close || premature) { CURLcode res2 = Curl_disconnect(conn, premature); /* close connection */ /* If we had an error already, make sure we return that one. But @@ -6108,7 +5937,7 @@ CURLcode Curl_do(struct connectdata **connp, bool *done) if(!data->multi) { result = Curl_reconnect_request(connp); - if(!result) { + if(result == CURLE_OK) { /* ... finally back to actually retry the DO phase */ conn = *connp; /* re-assign conn since Curl_reconnect_request creates a new connection */ @@ -6119,7 +5948,7 @@ CURLcode Curl_do(struct connectdata **connp, bool *done) return result; } - if(!result && *done) + if((result == CURLE_OK) && *done) /* do_complete must be called after the protocol-specific DO function */ do_complete(conn); } @@ -6152,3 +5981,4 @@ CURLcode Curl_do_more(struct connectdata *conn, int *complete) return result; } + diff --git a/lib/urldata.h b/lib/urldata.h index 50a745f..ebdad80 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -40,8 +40,6 @@ #define PORT_IMAPS 993 #define PORT_POP3 110 #define PORT_POP3S 995 -#define PORT_SMB 445 -#define PORT_SMBS 445 #define PORT_SMTP 25 #define PORT_SMTPS 465 /* sometimes called SSMTP */ #define PORT_RTSP 554 @@ -66,7 +64,6 @@ #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP|CURLPROTO_HTTPS) #define PROTO_FAMILY_FTP (CURLPROTO_FTP|CURLPROTO_FTPS) #define PROTO_FAMILY_POP3 (CURLPROTO_POP3|CURLPROTO_POP3S) -#define PROTO_FAMILY_SMB (CURLPROTO_SMB|CURLPROTO_SMBS) #define PROTO_FAMILY_SMTP (CURLPROTO_SMTP|CURLPROTO_SMTPS) #define DEFAULT_CONNCACHE_SIZE 5 @@ -141,6 +138,10 @@ #include #endif +#ifdef USE_QSOSSL +#include +#endif + #ifdef USE_GSKIT #include #endif @@ -194,7 +195,6 @@ #include "ssh.h" #include "http.h" #include "rtsp.h" -#include "smb.h" #include "wildcard.h" #include "multihandle.h" @@ -288,9 +288,6 @@ struct ssl_connect_data { current state of the connection. */ bool use; ssl_connection_state state; -#ifdef USE_NGHTTP2 - bool asked_for_h2; -#endif #ifdef USE_SSLEAY /* these ones requires specific SSL-types */ SSL_CTX* ctx; @@ -331,6 +328,9 @@ struct ssl_connect_data { PK11GenericObject *obj_clicert; ssl_connect_state connecting_state; #endif /* USE_NSS */ +#ifdef USE_QSOSSL + SSLHandle *handle; +#endif /* USE_QSOSSL */ #ifdef USE_GSKIT gsk_handle handle; int iocport; @@ -366,7 +366,6 @@ struct ssl_config_data { 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 */ char *CApath; /* certificate dir (doesn't work on windows) */ char *CAfile; /* certificate to verify peer against */ const char *CRLfile; /* CRL to check certificate revocation */ @@ -399,10 +398,6 @@ struct curl_ssl_session { /* Struct used for Digest challenge-response authentication */ struct digestdata { -#if defined(USE_WINDOWS_SSPI) - BYTE *input_token; - size_t input_token_len; -#else char *nonce; char *cnonce; char *realm; @@ -412,7 +407,6 @@ struct digestdata { char *qop; char *algorithm; int nc; /* nounce count */ -#endif }; typedef enum { @@ -431,37 +425,17 @@ typedef enum { #include #endif -/* Struct used for GSSAPI (Kerberos V5) authentication */ -#if defined(USE_KERBEROS5) -struct kerberos5data { -#if defined(USE_WINDOWS_SSPI) - CredHandle *credentials; - CtxtHandle *context; - TCHAR *spn; - SEC_WINNT_AUTH_IDENTITY identity; - SEC_WINNT_AUTH_IDENTITY *p_identity; - size_t token_max; - BYTE *output_token; -#else - gss_ctx_id_t context; - gss_name_t spn; -#endif -}; -#endif - /* Struct used for NTLM challenge-response authentication */ -#if defined(USE_NTLM) struct ntlmdata { curlntlm state; #ifdef USE_WINDOWS_SSPI - CredHandle *credentials; - CtxtHandle *context; + CredHandle handle; + CtxtHandle c_handle; SEC_WINNT_AUTH_IDENTITY identity; SEC_WINNT_AUTH_IDENTITY *p_identity; - size_t token_max; - BYTE *output_token; - BYTE *input_token; - size_t input_token_len; + int has_handles; + void *type_2; + unsigned long n_type_2; #else unsigned int flags; unsigned char nonce[8]; @@ -469,13 +443,14 @@ struct ntlmdata { unsigned int target_info_len; #endif }; -#endif -#ifdef USE_SPNEGO +#ifdef USE_HTTP_NEGOTIATE struct negotiatedata { - /* When doing Negotiate (SPNEGO) auth, we first need to send a token - and then validate the received one. */ + /* when doing Negotiate we first need to receive an auth token and then we + need to send our header */ enum { GSS_AUTHNONE, GSS_AUTHRECV, GSS_AUTHSENT } state; + bool gss; /* Whether we're processing GSS-Negotiate or Negotiate */ + const char* protocol; /* "GSS-Negotiate" or "Negotiate" */ #ifdef HAVE_GSSAPI OM_uint32 status; gss_ctx_id_t context; @@ -484,12 +459,10 @@ struct negotiatedata { #else #ifdef USE_WINDOWS_SSPI DWORD status; - CredHandle *credentials; CtxtHandle *context; - SEC_WINNT_AUTH_IDENTITY identity; - SEC_WINNT_AUTH_IDENTITY *p_identity; - TCHAR *server_name; - size_t token_max; + CredHandle *credentials; + char server_name[1024]; + size_t max_token_length; BYTE *output_token; size_t output_token_length; #endif @@ -895,7 +868,7 @@ struct connectdata { the ip_addr itself. */ char ip_addr_str[MAX_IPADR_LEN]; - unsigned int scope_id; /* Scope id for IPv6 */ + unsigned int scope; /* address scope for IPv6 */ int socktype; /* SOCK_STREAM or SOCK_DGRAM */ @@ -986,8 +959,8 @@ struct connectdata { char *te; /* TE: request header */ } allocptr; + int sec_complete; /* if kerberos is enabled for this connection */ #ifdef HAVE_GSSAPI - int sec_complete; /* if Kerberos is enabled for this connection */ enum protection_level command_prot; enum protection_level data_prot; enum protection_level request_data_prot; @@ -998,10 +971,6 @@ struct connectdata { struct sockaddr_in local_addr; #endif -#if defined(USE_KERBEROS5) /* Consider moving some of the above GSS-API */ - struct kerberos5data krb5; /* variables into the structure definition, */ -#endif /* however, some of them are ftp specific. */ - /* the two following *_inuse fields are only flags, not counters in any way. If TRUE it means the channel is in use, and if FALSE it means the channel is up for grabs by one. */ @@ -1029,20 +998,18 @@ struct connectdata { curl_read_callback fread_func; /* function that reads the input */ void *fread_in; /* pointer to pass to the fread() above */ -#if defined(USE_NTLM) struct ntlmdata ntlm; /* NTLM differs from other authentication schemes because it authenticates connections, not single requests! */ struct ntlmdata proxyntlm; /* NTLM data for proxy */ -#if defined(NTLM_WB_ENABLED) +#if defined(USE_NTLM) && defined(NTLM_WB_ENABLED) /* used for communication with Samba's winbind daemon helper ntlm_auth */ curl_socket_t ntlm_auth_hlpr_socket; pid_t ntlm_auth_hlpr_pid; char* challenge_header; char* response_header; #endif -#endif char syserr_buf [256]; /* buffer for Curl_strerror() */ @@ -1065,7 +1032,6 @@ struct connectdata { struct pop3_conn pop3c; struct smtp_conn smtpc; struct rtsp_conn rtspc; - struct smb_conn smbc; void *generic; /* RTMP and LDAP use this */ } proto; @@ -1281,7 +1247,7 @@ struct UrlState { struct digestdata digest; /* state data for host Digest auth */ struct digestdata proxydigest; /* state data for proxy Digest auth */ -#ifdef USE_SPNEGO +#ifdef USE_HTTP_NEGOTIATE struct negotiatedata negotiate; /* state data for host Negotiate auth */ struct negotiatedata proxyneg; /* state data for proxy Negotiate auth */ #endif @@ -1340,6 +1306,8 @@ struct UrlState { long rtsp_next_server_CSeq; /* the session's next server CSeq */ long rtsp_CSeq_recv; /* most recent CSeq received */ + /* if true, force SSL connection retry (workaround for certain servers) */ + bool ssl_connect_retry; curl_off_t infilesize; /* size of file to upload, -1 means unknown. Copied from set.filesize at start of operation */ }; @@ -1391,13 +1359,13 @@ enum dupstring { STRING_KRB_LEVEL, /* krb security level */ STRING_NETRC_FILE, /* if not NULL, use this instead of trying to find $HOME/.netrc */ + STRING_COPYPOSTFIELDS, /* if POST, set the fields' values here */ STRING_PROXY, /* proxy to use */ STRING_SET_RANGE, /* range, if used */ STRING_SET_REFERER, /* custom string for the HTTP referer field */ STRING_SET_URL, /* what original URL to work on */ STRING_SSL_CAPATH, /* CA directory name (doesn't work on windows) */ STRING_SSL_CAFILE, /* certificate file to verify peer against */ - STRING_SSL_PINNEDPUBLICKEY, /* public key file to verify peer against */ STRING_SSL_CIPHER_LIST, /* list of ciphers to use */ STRING_SSL_EGDSOCKET, /* path to file containing the EGD daemon socket */ STRING_SSL_RANDOM_FILE, /* path to file containing "random" data */ @@ -1421,29 +1389,19 @@ enum dupstring { STRING_SSH_KNOWNHOSTS, /* file name of knownhosts file */ #endif #if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) - STRING_SOCKS5_GSSAPI_SERVICE, /* GSSAPI service name */ + STRING_SOCKS5_GSSAPI_SERVICE, /* GSSAPI service name */ #endif STRING_MAIL_FROM, STRING_MAIL_AUTH, #ifdef USE_TLS_SRP - STRING_TLSAUTH_USERNAME, /* TLS auth */ - STRING_TLSAUTH_PASSWORD, /* TLS auth */ -#endif - STRING_BEARER, /* , if used */ -#ifdef USE_UNIX_SOCKETS - STRING_UNIX_SOCKET_PATH, /* path to Unix socket, if used */ + STRING_TLSAUTH_USERNAME, /* TLS auth */ + STRING_TLSAUTH_PASSWORD, /* TLS auth */ #endif - /* -- end of zero-terminated strings -- */ - - STRING_LASTZEROTERMINATED, - - /* -- below this are pointers to binary data that cannot be strdup'ed. - Each such pointer must be added manually to Curl_dupset() --- */ - - STRING_COPYPOSTFIELDS, /* if POST, set the fields' values here */ + STRING_BEARER, /* , if used */ + /* -- end of strings -- */ STRING_LAST /* not used, just an end-of-list marker */ }; @@ -1576,7 +1534,7 @@ struct UserDefined { bool ftp_list_only; /* switch FTP command for listing directories */ bool ftp_use_port; /* use the FTP PORT command */ bool hide_progress; /* don't use the progress meter */ - bool http_fail_on_error; /* fail on HTTP error codes >= 400 */ + bool http_fail_on_error; /* fail on HTTP error 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; @@ -1589,7 +1547,7 @@ struct UserDefined { enum CURL_NETRC_OPTION use_netrc; /* defined in include/curl.h */ bool verbose; /* output verbosity */ - bool krb; /* Kerberos connection requested */ + bool krb; /* kerberos connection requested */ bool reuse_forbid; /* forbidden to be reused, close after use */ bool reuse_fresh; /* do not re-use an existing connection */ bool ftp_use_epsv; /* if EPSV is to be attempted or not */ @@ -1619,7 +1577,7 @@ struct UserDefined { bool proxy_transfer_mode; /* set transfer mode (;type=) when doing FTP via an HTTP proxy */ char *str[STRING_LAST]; /* array of strings, pointing to allocated memory */ - unsigned int scope_id; /* Scope id for IPv6 */ + unsigned int scope; /* address scope for IPv6 */ long allowed_protocols; long redir_protocols; #if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) @@ -1639,7 +1597,7 @@ struct UserDefined { to pattern (e.g. if WILDCARDMATCH is on) */ void *fnmatch_data; - long gssapi_delegation; /* GSS-API credential delegation, see the + long gssapi_delegation; /* GSSAPI credential delegation, see the documentation of CURLOPT_GSSAPI_DELEGATION */ bool tcp_keepalive; /* use TCP keepalives */ diff --git a/lib/version.c b/lib/version.c index 9ac9226..2c0e9b8 100644 --- a/lib/version.c +++ b/lib/version.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -216,14 +216,6 @@ static const char * const protocols[] = { #ifdef USE_LIBSSH2 "sftp", #endif -#if !defined(CURL_DISABLE_SMB) && defined(USE_NTLM) && \ - (CURL_SIZEOF_CURL_OFF_T > 4) && \ - (!defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO)) - "smb", -# ifdef USE_SSL - "smbs", -# endif -#endif #ifndef CURL_DISABLE_SMTP "smtp", #endif @@ -255,25 +247,18 @@ static curl_version_info_data version_info = { #ifdef USE_NTLM | CURL_VERSION_NTLM #endif -#if !defined(CURL_DISABLE_HTTP) && defined(USE_NTLM) && \ - defined(NTLM_WB_ENABLED) +#if defined(USE_NTLM) && defined(NTLM_WB_ENABLED) | CURL_VERSION_NTLM_WB #endif -#ifdef USE_SPNEGO - | CURL_VERSION_SPNEGO -#endif -#ifdef USE_KERBEROS5 - | CURL_VERSION_KERBEROS5 -#endif -#ifdef HAVE_GSSAPI - | CURL_VERSION_GSSAPI -#endif #ifdef USE_WINDOWS_SSPI | CURL_VERSION_SSPI #endif #ifdef HAVE_LIBZ | CURL_VERSION_LIBZ #endif +#ifdef USE_HTTP_NEGOTIATE + | CURL_VERSION_GSSNEGOTIATE +#endif #ifdef DEBUGBUILD | CURL_VERSION_DEBUG #endif @@ -283,6 +268,9 @@ static curl_version_info_data version_info = { #ifdef CURLRES_ASYNCH | CURL_VERSION_ASYNCHDNS #endif +#ifdef HAVE_SPNEGO + | CURL_VERSION_SPNEGO +#endif #if (CURL_SIZEOF_CURL_OFF_T > 4) && \ ( (SIZEOF_OFF_T > 4) || defined(USE_WIN32_LARGE_FILES) ) | CURL_VERSION_LARGEFILE @@ -296,9 +284,6 @@ static curl_version_info_data version_info = { #if defined(USE_NGHTTP2) | CURL_VERSION_HTTP2 #endif -#if defined(USE_UNIX_SOCKETS) - | CURL_VERSION_UNIX_SOCKETS -#endif , NULL, /* ssl_version */ 0, /* ssl_version_num, this is kept at zero */ diff --git a/lib/vtls/axtls.c b/lib/vtls/axtls.c index 1b577b1..36cb7ad 100644 --- a/lib/vtls/axtls.c +++ b/lib/vtls/axtls.c @@ -664,21 +664,4 @@ size_t Curl_axtls_version(char *buffer, size_t size) return snprintf(buffer, size, "axTLS/%s", ssl_version()); } -int Curl_axtls_random(struct SessionHandle *data, - unsigned char *entropy, - size_t length) -{ - static bool ssl_seeded = FALSE; - (void)data; - if(!ssl_seeded) { - ssl_seeded = TRUE; - /* Initialize the seed if not already done. This call is not exactly thread - * safe (and neither is the ssl_seeded check), but the worst effect of a - * race condition is that some global resources will leak. */ - RNG_initialize(); - } - get_random(length, entropy); - return 0; -} - #endif /* USE_AXTLS */ diff --git a/lib/vtls/axtls.h b/lib/vtls/axtls.h index 62b4ab0..db91365 100644 --- a/lib/vtls/axtls.h +++ b/lib/vtls/axtls.h @@ -7,8 +7,8 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2010, DirecTV, Contact: Eric Hu - * Copyright (C) 2010 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 2010, DirecTV + * contact: Eric Hu * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -46,9 +46,6 @@ 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); -int Curl_axtls_random(struct SessionHandle *data, - unsigned char *entropy, - size_t length); /* API setup for axTLS */ #define curlssl_init Curl_axtls_init @@ -59,14 +56,12 @@ int Curl_axtls_random(struct SessionHandle *data, #define curlssl_close_all Curl_axtls_close_all #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_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_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) -#define CURL_SSL_BACKEND CURLSSLBACKEND_AXTLS +#define curlssl_data_pending(x,y) (x=x, y=y, 0) #endif /* USE_AXTLS */ #endif /* HEADER_CURL_AXTLS_H */ diff --git a/lib/vtls/curl_darwinssl.c b/lib/vtls/curl_darwinssl.c index c056198..1ff5c24 100644 --- a/lib/vtls/curl_darwinssl.c +++ b/lib/vtls/curl_darwinssl.c @@ -6,7 +6,7 @@ * \___|\___/|_| \_\_____| * * Copyright (C) 2012 - 2014, Nick Zitzmann, . - * Copyright (C) 2012 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 2012 - 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 @@ -30,7 +30,6 @@ #include "urldata.h" /* for the SessionHandle definition */ #include "curl_base64.h" -#include "strtok.h" #ifdef USE_DARWINSSL @@ -86,7 +85,6 @@ #define CURL_SUPPORT_MAC_10_6 0 #define CURL_SUPPORT_MAC_10_7 0 #define CURL_SUPPORT_MAC_10_8 0 -#define CURL_SUPPORT_MAC_10_9 0 #else #error "The darwinssl back-end requires iOS or OS X." @@ -784,7 +782,6 @@ CF_INLINE void GetDarwinVersionNumber(int *major, int *minor) char *os_version; size_t os_version_len; char *os_version_major, *os_version_minor/*, *os_version_point*/; - char *tok_buf; /* Get the Darwin kernel version from the kernel using sysctl(): */ mib[0] = CTL_KERN; @@ -800,9 +797,9 @@ CF_INLINE void GetDarwinVersionNumber(int *major, int *minor) } /* Parse the version: */ - os_version_major = strtok_r(os_version, ".", &tok_buf); - os_version_minor = strtok_r(NULL, ".", &tok_buf); - /*os_version_point = strtok_r(NULL, ".", &tok_buf);*/ + os_version_major = strtok(os_version, "."); + os_version_minor = strtok(NULL, "."); + /*os_version_point = strtok(NULL, ".");*/ *major = atoi(os_version_major); *minor = atoi(os_version_minor); free(os_version); @@ -1058,8 +1055,10 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, #if CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS if(SSLSetProtocolVersionMax != NULL) { switch(data->set.ssl.version) { - default: - case CURL_SSLVERSION_DEFAULT: + case CURL_SSLVERSION_DEFAULT: default: + (void)SSLSetProtocolVersionMin(connssl->ssl_ctx, kSSLProtocol3); + (void)SSLSetProtocolVersionMax(connssl->ssl_ctx, kTLSProtocol12); + break; case CURL_SSLVERSION_TLSv1: (void)SSLSetProtocolVersionMin(connssl->ssl_ctx, kTLSProtocol1); (void)SSLSetProtocolVersionMax(connssl->ssl_ctx, kTLSProtocol12); @@ -1077,11 +1076,7 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, (void)SSLSetProtocolVersionMax(connssl->ssl_ctx, kTLSProtocol12); break; case CURL_SSLVERSION_SSLv3: - err = SSLSetProtocolVersionMin(connssl->ssl_ctx, kSSLProtocol3); - if(err != noErr) { - failf(data, "Your version of the OS does not support SSLv3"); - return CURLE_SSL_CONNECT_ERROR; - } + (void)SSLSetProtocolVersionMin(connssl->ssl_ctx, kSSLProtocol3); (void)SSLSetProtocolVersionMax(connssl->ssl_ctx, kSSLProtocol3); break; case CURL_SSLVERSION_SSLv2: @@ -1099,8 +1094,20 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, kSSLProtocolAll, false); switch (data->set.ssl.version) { - default: - case CURL_SSLVERSION_DEFAULT: + case CURL_SSLVERSION_DEFAULT: default: + (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx, + kSSLProtocol3, + true); + (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx, + kTLSProtocol1, + true); + (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx, + kTLSProtocol11, + true); + (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx, + kTLSProtocol12, + true); + break; case CURL_SSLVERSION_TLSv1: (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx, kTLSProtocol1, @@ -1128,13 +1135,9 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, true); break; case CURL_SSLVERSION_SSLv3: - err = SSLSetProtocolVersionEnabled(connssl->ssl_ctx, + (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx, kSSLProtocol3, true); - if(err != noErr) { - failf(data, "Your version of the OS does not support SSLv3"); - return CURLE_SSL_CONNECT_ERROR; - } break; case CURL_SSLVERSION_SSLv2: err = SSLSetProtocolVersionEnabled(connssl->ssl_ctx, @@ -1153,6 +1156,13 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, switch(data->set.ssl.version) { default: case CURL_SSLVERSION_DEFAULT: + (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx, + kSSLProtocol3, + true); + (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx, + kTLSProtocol1, + true); + break; case CURL_SSLVERSION_TLSv1: case CURL_SSLVERSION_TLSv1_0: (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx, @@ -1175,13 +1185,9 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, } break; case CURL_SSLVERSION_SSLv3: - err = SSLSetProtocolVersionEnabled(connssl->ssl_ctx, + (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx, kSSLProtocol3, true); - if(err != noErr) { - failf(data, "Your version of the OS does not support SSLv3"); - return CURLE_SSL_CONNECT_ERROR; - } break; } #endif /* CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS */ @@ -1468,7 +1474,7 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, /* Check if there's a cached ID we can/should use here! */ if(!Curl_ssl_getsessionid(conn, (void **)&ssl_sessionid, - &ssl_sessionid_len)) { + &ssl_sessionid_len)) { /* we got a session id, use it! */ err = SSLSetPeerID(connssl->ssl_ctx, ssl_sessionid, ssl_sessionid_len); if(err != noErr) { @@ -1481,23 +1487,20 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, /* If there isn't one, then let's make one up! This has to be done prior to starting the handshake. */ else { - CURLcode result; - ssl_sessionid = - aprintf("%s:%d:%d:%s:%hu", data->set.str[STRING_SSL_CAFILE], - data->set.ssl.verifypeer, data->set.ssl.verifyhost, - conn->host.name, conn->remote_port); - ssl_sessionid_len = strlen(ssl_sessionid); + CURLcode retcode; + ssl_sessionid = malloc(256*sizeof(char)); + ssl_sessionid_len = snprintf(ssl_sessionid, 256, "curl:%s:%hu", + conn->host.name, conn->remote_port); err = SSLSetPeerID(connssl->ssl_ctx, ssl_sessionid, ssl_sessionid_len); if(err != noErr) { failf(data, "SSL: SSLSetPeerID() failed: OSStatus %d", err); return CURLE_SSL_CONNECT_ERROR; } - - result = Curl_ssl_addsessionid(conn, ssl_sessionid, ssl_sessionid_len); - if(result) { + retcode = Curl_ssl_addsessionid(conn, ssl_sessionid, ssl_sessionid_len); + if(retcode!= CURLE_OK) { failf(data, "failed to store ssl session"); - return result; + return retcode; } } @@ -1522,42 +1525,43 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, return CURLE_OK; } -static long pem_to_der(const char *in, unsigned char **out, size_t *outlen) +static int pem_to_der(const char *in, unsigned char **out, size_t *outlen) { - char *sep_start, *sep_end, *cert_start, *cert_end; + char *sep, *start, *end; size_t i, j, err; size_t len; unsigned char *b64; - /* Jump through the separators at the beginning of the certificate. */ - sep_start = strstr(in, "-----"); - if(sep_start == NULL) - return 0; - cert_start = strstr(sep_start + 1, "-----"); - if(cert_start == NULL) + /* Jump through the separators in the first line. */ + sep = strstr(in, "-----"); + if(sep == NULL) + return -1; + sep = strstr(sep + 1, "-----"); + if(sep == NULL) return -1; - cert_start += 5; + start = sep + 5; - /* Find separator after the end of the certificate. */ - cert_end = strstr(cert_start, "-----"); - if(cert_end == NULL) + /* Find beginning of last line separator. */ + end = strstr(start, "-----"); + if(end == NULL) return -1; - sep_end = strstr(cert_end + 1, "-----"); - if(sep_end == NULL) + len = end - start; + *out = malloc(len); + if(!*out) return -1; - sep_end += 5; - len = cert_end - cert_start; b64 = malloc(len + 1); - if(!b64) + if(!b64) { + free(*out); return -1; + } /* Create base64 string without linefeeds. */ for(i = 0, j = 0; i < len; i++) { - if(cert_start[i] != '\r' && cert_start[i] != '\n') - b64[j++] = cert_start[i]; + if(start[i] != '\r' && start[i] != '\n') + b64[j++] = start[i]; } b64[j] = '\0'; @@ -1568,14 +1572,15 @@ static long pem_to_der(const char *in, unsigned char **out, size_t *outlen) return -1; } - return sep_end - in; + return 0; } 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; + size_t derlen; + unsigned char buf[cap], *data, *der; fd = open(file, 0); if(fd < 0) @@ -1613,6 +1618,16 @@ static int read_cert(const char *file, unsigned char **out, size_t *outlen) } data[len] = '\0'; + /* + * Check if the certificate is in PEM format, and convert it to DER. If this + * fails, we assume the certificate is in DER format. + */ + if(pem_to_der((const char *)data, &der, &derlen) == 0) { + free(data); + data = der; + len = derlen; + } + *out = data; *outlen = len; @@ -1648,145 +1663,51 @@ static int sslerr_to_curlerr(struct SessionHandle *data, int err) } } -static int append_cert_to_array(struct SessionHandle *data, - unsigned char *buf, size_t buflen, - CFMutableArrayRef array) -{ - CFDataRef certdata = CFDataCreate(kCFAllocatorDefault, buf, buflen); - if(!certdata) { - failf(data, "SSL: failed to allocate array for CA certificate"); - return CURLE_OUT_OF_MEMORY; - } - - SecCertificateRef cacert = - SecCertificateCreateWithData(kCFAllocatorDefault, certdata); - CFRelease(certdata); - if(!cacert) { - failf(data, "SSL: failed to create SecCertificate from CA certificate"); - return CURLE_SSL_CACERT; - } - - /* 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; - } - - CFArrayAppendValue(array, cacert); - CFRelease(cacert); - - return CURLE_OK; -} - static int verify_cert(const char *cafile, struct SessionHandle *data, SSLContextRef ctx) { - int n = 0, rc; - long res; - unsigned char *certbuf, *der; - size_t buflen, derlen, offset = 0; - + unsigned char *certbuf; + size_t buflen; if(read_cert(cafile, &certbuf, &buflen) < 0) { failf(data, "SSL: failed to read or invalid CA certificate"); return CURLE_SSL_CACERT; } - /* - * Certbuf now contains the contents of the certificate file, which can be - * - a single DER certificate, - * - a single PEM certificate or - * - a bunch of PEM certificates (certificate bundle). - * - * Go through certbuf, and convert any PEM certificate in it into DER - * format. - */ - CFMutableArrayRef array = CFArrayCreateMutable(kCFAllocatorDefault, 0, - &kCFTypeArrayCallBacks); - if(array == NULL) { - free(certbuf); - failf(data, "SSL: out of memory creating CA certificate array"); + CFDataRef certdata = CFDataCreate(kCFAllocatorDefault, certbuf, buflen); + free(certbuf); + if(!certdata) { + failf(data, "SSL: failed to allocate array for CA certificate"); return CURLE_OUT_OF_MEMORY; } - while(offset < buflen) { - n++; - - /* - * Check if the certificate is in PEM format, and convert it to DER. If - * this fails, we assume the certificate is in DER format. - */ - res = pem_to_der((const char *)certbuf + offset, &der, &derlen); - if(res < 0) { - free(certbuf); - CFRelease(array); - failf(data, "SSL: invalid CA certificate #%d (offset %d) in bundle", - n, offset); - return CURLE_SSL_CACERT; - } - offset += res; - - if(res == 0 && offset == 0) { - /* This is not a PEM file, probably a certificate in DER format. */ - rc = append_cert_to_array(data, certbuf, buflen, array); - free(certbuf); - if(rc != CURLE_OK) { - CFRelease(array); - return rc; - } - break; - } - else if(res == 0) { - /* No more certificates in the bundle. */ - free(certbuf); - break; - } - - rc = append_cert_to_array(data, der, derlen, array); - free(der); - if(rc != CURLE_OK) { - free(certbuf); - CFRelease(array); - return rc; - } + SecCertificateRef cacert = SecCertificateCreateWithData(kCFAllocatorDefault, + certdata); + CFRelease(certdata); + if(!cacert) { + failf(data, "SSL: failed to create SecCertificate from CA certificate"); + return CURLE_SSL_CACERT; } SecTrustRef trust; OSStatus ret = SSLCopyPeerTrust(ctx, &trust); if(trust == NULL) { failf(data, "SSL: error getting certificate chain"); - CFRelease(array); return CURLE_OUT_OF_MEMORY; } else if(ret != noErr) { - CFRelease(array); return sslerr_to_curlerr(data, ret); } + CFMutableArrayRef array = CFArrayCreateMutable(kCFAllocatorDefault, 0, + &kCFTypeArrayCallBacks); + CFArrayAppendValue(array, cacert); + CFRelease(cacert); + ret = SecTrustSetAnchorCertificates(trust, array); if(ret != noErr) { CFRelease(trust); return sslerr_to_curlerr(data, ret); } - ret = SecTrustSetAnchorCertificatesOnly(trust, true); - if(ret != noErr) { - CFRelease(trust); - return sslerr_to_curlerr(data, ret); - } SecTrustResultType trust_eval = 0; ret = SecTrustEvaluate(trust, &trust_eval); @@ -1799,6 +1720,8 @@ static int verify_cert(const char *cafile, struct SessionHandle *data, switch (trust_eval) { case kSecTrustResultUnspecified: case kSecTrustResultProceed: + infof(data, "SSL: certificate verification succeeded (result: %d)", + trust_eval); return CURLE_OK; case kSecTrustResultRecoverableTrustFailure: @@ -2076,7 +1999,7 @@ darwinssl_connect_common(struct connectdata *conn, bool nonblocking, bool *done) { - CURLcode result; + CURLcode retcode; struct SessionHandle *data = conn->data; struct ssl_connect_data *connssl = &conn->ssl[sockindex]; curl_socket_t sockfd = conn->sock[sockindex]; @@ -2098,10 +2021,9 @@ darwinssl_connect_common(struct connectdata *conn, failf(data, "SSL connection timeout"); return CURLE_OPERATION_TIMEDOUT; } - - result = darwinssl_connect_step1(conn, sockindex); - if(result) - return result; + retcode = darwinssl_connect_step1(conn, sockindex); + if(retcode) + return retcode; } while(ssl_connect_2 == connssl->connecting_state || @@ -2118,8 +2040,8 @@ darwinssl_connect_common(struct connectdata *conn, } /* if ssl is expecting something, check if it's available. */ - if(connssl->connecting_state == ssl_connect_2_reading || - connssl->connecting_state == ssl_connect_2_writing) { + if(connssl->connecting_state == ssl_connect_2_reading + || connssl->connecting_state == ssl_connect_2_writing) { curl_socket_t writefd = ssl_connect_2_writing == connssl->connecting_state?sockfd:CURL_SOCKET_BAD; @@ -2152,23 +2074,23 @@ darwinssl_connect_common(struct connectdata *conn, * before step2 has completed while ensuring that a client using select() * or epoll() will always have a valid fdset to wait on. */ - result = darwinssl_connect_step2(conn, sockindex); - if(result || (nonblocking && - (ssl_connect_2 == connssl->connecting_state || - ssl_connect_2_reading == connssl->connecting_state || - ssl_connect_2_writing == connssl->connecting_state))) - return result; + retcode = darwinssl_connect_step2(conn, sockindex); + if(retcode || (nonblocking && + (ssl_connect_2 == connssl->connecting_state || + ssl_connect_2_reading == connssl->connecting_state || + ssl_connect_2_writing == connssl->connecting_state))) + return retcode; } /* repeat step2 until all transactions are done. */ - if(ssl_connect_3 == connssl->connecting_state) { - result = darwinssl_connect_step3(conn, sockindex); - if(result) - return result; + if(ssl_connect_3==connssl->connecting_state) { + retcode = darwinssl_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] = darwinssl_recv; conn->send[sockindex] = darwinssl_send; @@ -2195,13 +2117,13 @@ CURLcode Curl_darwinssl_connect(struct connectdata *conn, int sockindex) { - CURLcode result; + CURLcode retcode; bool done = FALSE; - result = darwinssl_connect_common(conn, sockindex, FALSE, &done); + retcode = darwinssl_connect_common(conn, sockindex, FALSE, &done); - if(result) - return result; + if(retcode) + return retcode; DEBUGASSERT(done); @@ -2345,8 +2267,9 @@ bool Curl_darwinssl_data_pending(const struct connectdata *conn, return false; } -int Curl_darwinssl_random(unsigned char *entropy, - size_t length) +void Curl_darwinssl_random(struct SessionHandle *data, + 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. */ @@ -2360,7 +2283,7 @@ int Curl_darwinssl_random(unsigned char *entropy, random_number >>= 8; } i = random_number = 0; - return 0; + (void)data; } void Curl_darwinssl_md5sum(unsigned char *tmp, /* input */ diff --git a/lib/vtls/curl_darwinssl.h b/lib/vtls/curl_darwinssl.h index 7c80edf..432d3d7 100644 --- a/lib/vtls/curl_darwinssl.h +++ b/lib/vtls/curl_darwinssl.h @@ -7,8 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2012 - 2014, Nick Zitzmann, . - * Copyright (C) 2012 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 2012 - 2013, Nick Zitzmann, . * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -45,13 +44,18 @@ int Curl_darwinssl_check_cxn(struct connectdata *conn); bool Curl_darwinssl_data_pending(const struct connectdata *conn, int connindex); -int Curl_darwinssl_random(unsigned char *entropy, - size_t length); +void Curl_darwinssl_random(struct SessionHandle *data, + unsigned char *entropy, + size_t length); void Curl_darwinssl_md5sum(unsigned char *tmp, /* input */ size_t tmplen, unsigned char *md5sum, /* output */ size_t md5len); +/* this backend provides these functions: */ +#define have_curlssl_random 1 +#define have_curlssl_md5sum 1 + /* API setup for SecureTransport */ #define curlssl_init() (1) #define curlssl_cleanup() Curl_nop_stmt @@ -61,15 +65,14 @@ void Curl_darwinssl_md5sum(unsigned char *tmp, /* input */ #define curlssl_close_all Curl_darwinssl_close_all #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_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_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_random(x,y,z) Curl_darwinssl_random(x,y,z) #define curlssl_md5sum(a,b,c,d) Curl_darwinssl_md5sum(a,b,c,d) -#define CURL_SSL_BACKEND CURLSSLBACKEND_DARWINSSL #endif /* USE_DARWINSSL */ #endif /* HEADER_CURL_DARWINSSL_H */ diff --git a/lib/vtls/curl_schannel.c b/lib/vtls/curl_schannel.c index 787929c..64e79e1 100644 --- a/lib/vtls/curl_schannel.c +++ b/lib/vtls/curl_schannel.c @@ -127,7 +127,7 @@ schannel_connect_step1(struct connectdata *conn, int sockindex) conn->host.name, conn->remote_port); /* check for an existing re-usable credential handle */ - if(!Curl_ssl_getsessionid(conn, (void **)&old_cred, NULL)) { + if(!Curl_ssl_getsessionid(conn, (void**)&old_cred, NULL)) { connssl->cred = old_cred; infof(data, "schannel: re-using existing credential handle\n"); } @@ -164,8 +164,6 @@ schannel_connect_step1(struct connectdata *conn, int sockindex) } switch(data->set.ssl.version) { - default: - case CURL_SSLVERSION_DEFAULT: case CURL_SSLVERSION_TLSv1: schannel_cred.grbitEnabledProtocols = SP_PROT_TLS1_0_CLIENT | SP_PROT_TLS1_1_CLIENT | @@ -186,6 +184,12 @@ schannel_connect_step1(struct connectdata *conn, int sockindex) case CURL_SSLVERSION_SSLv2: schannel_cred.grbitEnabledProtocols = SP_PROT_SSL2_CLIENT; break; + default: + schannel_cred.grbitEnabledProtocols = SP_PROT_TLS1_0_CLIENT | + SP_PROT_TLS1_1_CLIENT | + SP_PROT_TLS1_2_CLIENT | + SP_PROT_SSL3_CLIENT; + break; } /* allocate memory for the re-usable credential handle */ @@ -294,8 +298,6 @@ schannel_connect_step2(struct connectdata *conn, int sockindex) ssize_t nread = -1, written = -1; struct SessionHandle *data = conn->data; struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - unsigned char *reallocated_buffer; - size_t reallocated_length; SecBuffer outbuf[2]; SecBufferDesc outbuf_desc; SecBuffer inbuf[2]; @@ -328,19 +330,14 @@ schannel_connect_step2(struct connectdata *conn, int sockindex) if(connssl->encdata_length - connssl->encdata_offset < CURL_SCHANNEL_BUFFER_FREE_SIZE) { /* increase internal encrypted data buffer */ - reallocated_length = connssl->encdata_offset + - CURL_SCHANNEL_BUFFER_FREE_SIZE; - reallocated_buffer = realloc(connssl->encdata_buffer, - reallocated_length); + connssl->encdata_length *= CURL_SCHANNEL_BUFFER_STEP_FACTOR; + connssl->encdata_buffer = realloc(connssl->encdata_buffer, + connssl->encdata_length); - if(reallocated_buffer == NULL) { + if(connssl->encdata_buffer == NULL) { failf(data, "schannel: unable to re-allocate memory"); return CURLE_OUT_OF_MEMORY; } - else { - connssl->encdata_buffer = reallocated_buffer; - connssl->encdata_length = reallocated_length; - } } for(;;) { @@ -505,11 +502,11 @@ schannel_connect_step2(struct connectdata *conn, int sockindex) static CURLcode schannel_connect_step3(struct connectdata *conn, int sockindex) { - CURLcode result = CURLE_OK; + CURLcode retcode = CURLE_OK; struct SessionHandle *data = conn->data; struct ssl_connect_data *connssl = &conn->ssl[sockindex]; struct curl_schannel_cred *old_cred = NULL; - bool incache; + int incache; DEBUGASSERT(ssl_connect_3 == connssl->connecting_state); @@ -542,21 +539,20 @@ schannel_connect_step3(struct connectdata *conn, int sockindex) } /* save the current session data for possible re-use */ - incache = !(Curl_ssl_getsessionid(conn, (void **)&old_cred, NULL)); + incache = !(Curl_ssl_getsessionid(conn, (void**)&old_cred, NULL)); if(incache) { if(old_cred != connssl->cred) { infof(data, "schannel: old credential handle is stale, removing\n"); - Curl_ssl_delsessionid(conn, (void *)old_cred); + Curl_ssl_delsessionid(conn, (void*)old_cred); incache = FALSE; } } - if(!incache) { - result = Curl_ssl_addsessionid(conn, (void *)connssl->cred, - sizeof(struct curl_schannel_cred)); - if(result) { + retcode = Curl_ssl_addsessionid(conn, (void*)connssl->cred, + sizeof(struct curl_schannel_cred)); + if(retcode) { failf(data, "schannel: failed to store credential handle"); - return result; + return retcode; } else { connssl->cred->cached = TRUE; @@ -573,7 +569,7 @@ static CURLcode schannel_connect_common(struct connectdata *conn, int sockindex, bool nonblocking, bool *done) { - CURLcode result; + CURLcode retcode; struct SessionHandle *data = conn->data; struct ssl_connect_data *connssl = &conn->ssl[sockindex]; curl_socket_t sockfd = conn->sock[sockindex]; @@ -596,9 +592,9 @@ schannel_connect_common(struct connectdata *conn, int sockindex, return CURLE_OPERATION_TIMEDOUT; } - result = schannel_connect_step1(conn, sockindex); - if(result) - return result; + retcode = schannel_connect_step1(conn, sockindex); + if(retcode) + return retcode; } while(ssl_connect_2 == connssl->connecting_state || @@ -650,19 +646,19 @@ schannel_connect_common(struct connectdata *conn, int sockindex, * ensuring that a client using select() or epoll() will always * have a valid fdset to wait on. */ - result = schannel_connect_step2(conn, sockindex); - if(result || (nonblocking && - (ssl_connect_2 == connssl->connecting_state || - ssl_connect_2_reading == connssl->connecting_state || - ssl_connect_2_writing == connssl->connecting_state))) - return result; + retcode = schannel_connect_step2(conn, sockindex); + if(retcode || (nonblocking && + (ssl_connect_2 == connssl->connecting_state || + ssl_connect_2_reading == connssl->connecting_state || + ssl_connect_2_writing == connssl->connecting_state))) + return retcode; } /* repeat step2 until all transactions are done. */ if(ssl_connect_3 == connssl->connecting_state) { - result = schannel_connect_step3(conn, sockindex); - if(result) - return result; + retcode = schannel_connect_step3(conn, sockindex); + if(retcode) + return retcode; } if(ssl_connect_done == connssl->connecting_state) { @@ -714,7 +710,7 @@ schannel_send(struct connectdata *conn, int sockindex, /* calculate the complete message length and allocate a buffer for it */ data_len = connssl->stream_sizes.cbHeader + len + connssl->stream_sizes.cbTrailer; - data = (unsigned char *) malloc(data_len); + data = (unsigned char*) malloc(data_len); if(data == NULL) { *err = CURLE_OUT_OF_MEMORY; return -1; @@ -833,11 +829,9 @@ schannel_recv(struct connectdata *conn, int sockindex, { size_t size = 0; ssize_t nread = 0, ret = -1; - CURLcode result; + CURLcode retcode; struct SessionHandle *data = conn->data; struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - unsigned char *reallocated_buffer; - size_t reallocated_length; bool done = FALSE; SecBuffer inbuf[4]; SecBufferDesc inbuf_desc; @@ -859,27 +853,18 @@ schannel_recv(struct connectdata *conn, int sockindex, } /* increase buffer in order to fit the requested amount of data */ - if(connssl->encdata_length - connssl->encdata_offset < - CURL_SCHANNEL_BUFFER_FREE_SIZE || connssl->encdata_length < len) { + while(connssl->encdata_length - connssl->encdata_offset < + CURL_SCHANNEL_BUFFER_FREE_SIZE || connssl->encdata_length < len) { /* increase internal encrypted data buffer */ - reallocated_length = connssl->encdata_offset + - CURL_SCHANNEL_BUFFER_FREE_SIZE; - /* make sure that the requested amount of data fits */ - if(reallocated_length < len) { - reallocated_length = len; - } - reallocated_buffer = realloc(connssl->encdata_buffer, - reallocated_length); + connssl->encdata_length *= CURL_SCHANNEL_BUFFER_STEP_FACTOR; + connssl->encdata_buffer = realloc(connssl->encdata_buffer, + connssl->encdata_length); - if(reallocated_buffer == NULL) { + if(connssl->encdata_buffer == NULL) { failf(data, "schannel: unable to re-allocate memory"); *err = CURLE_OUT_OF_MEMORY; return -1; } - else { - connssl->encdata_buffer = reallocated_buffer; - connssl->encdata_length = reallocated_length; - } } /* read encrypted data from socket */ @@ -931,11 +916,10 @@ schannel_recv(struct connectdata *conn, int sockindex, } /* check if everything went fine (server may want to renegotiate - or shutdown the connection context) */ + context) */ if(sspi_status == SEC_E_OK || sspi_status == SEC_I_RENEGOTIATE || sspi_status == SEC_I_CONTEXT_EXPIRED) { - /* check for successfully decrypted data, even before actual - renegotiation or shutdown of the connection context */ + /* check for successfully decrypted data */ if(inbuf[1].BufferType == SECBUFFER_DATA) { infof(data, "schannel: decrypted data length: %lu\n", inbuf[1].cbBuffer); @@ -943,26 +927,18 @@ 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) { + while(connssl->decdata_length - connssl->decdata_offset < size || + connssl->decdata_length < len) { /* increase internal decrypted data buffer */ - reallocated_length = connssl->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_length); + connssl->decdata_length *= CURL_SCHANNEL_BUFFER_STEP_FACTOR; + connssl->decdata_buffer = realloc(connssl->decdata_buffer, + connssl->decdata_length); - if(reallocated_buffer == NULL) { + if(connssl->decdata_buffer == NULL) { failf(data, "schannel: unable to re-allocate memory"); *err = CURLE_OUT_OF_MEMORY; return -1; } - else { - connssl->decdata_buffer = reallocated_buffer; - connssl->decdata_length = reallocated_length; - } } /* copy decrypted data to internal buffer */ @@ -1012,9 +988,9 @@ schannel_recv(struct connectdata *conn, int sockindex, infof(data, "schannel: renegotiating SSL/TLS connection\n"); connssl->state = ssl_connection_negotiating; connssl->connecting_state = ssl_connect_2_writing; - result = schannel_connect_common(conn, sockindex, FALSE, &done); - if(result) - *err = result; + retcode = schannel_connect_common(conn, sockindex, FALSE, &done); + if(retcode) + *err = retcode; else { infof(data, "schannel: SSL/TLS connection renegotiated\n"); /* now retry receiving data */ @@ -1041,8 +1017,6 @@ schannel_recv(struct connectdata *conn, int sockindex, infof(data, "schannel: decrypted data buffer: offset %zu length %zu\n", connssl->decdata_offset, connssl->decdata_length); } - else - ret = 0; /* check if the server closed the connection */ if(ret <= 0 && ( /* special check for Windows 2000 Professional */ @@ -1074,12 +1048,12 @@ Curl_schannel_connect_nonblocking(struct connectdata *conn, int sockindex, CURLcode Curl_schannel_connect(struct connectdata *conn, int sockindex) { - CURLcode result; + CURLcode retcode; bool done = FALSE; - result = schannel_connect_common(conn, sockindex, FALSE, &done); - if(result) - return result; + retcode = schannel_connect_common(conn, sockindex, FALSE, &done); + if(retcode) + return retcode; DEBUGASSERT(done); @@ -1171,29 +1145,29 @@ int Curl_schannel_shutdown(struct connectdata *conn, int sockindex) " (bytes written: %zd)\n", curl_easy_strerror(code), written); } } - } - /* free SSPI Schannel API security context handle */ - if(connssl->ctxt) { - infof(data, "schannel: clear security context handle\n"); - s_pSecFn->DeleteSecurityContext(&connssl->ctxt->ctxt_handle); - Curl_safefree(connssl->ctxt); - } - - /* free SSPI Schannel API credential handle */ - if(connssl->cred) { - /* decrement the reference counter of the credential/session handle */ - if(connssl->cred->refcount > 0) { - connssl->cred->refcount--; - infof(data, "schannel: decremented credential handle refcount = %d\n", - connssl->cred->refcount); + /* free SSPI Schannel API security context handle */ + if(connssl->ctxt) { + infof(data, "schannel: clear security context handle\n"); + s_pSecFn->DeleteSecurityContext(&connssl->ctxt->ctxt_handle); + Curl_safefree(connssl->ctxt); } - /* if the handle was not cached and the refcount is zero */ - if(!connssl->cred->cached && connssl->cred->refcount == 0) { - infof(data, "schannel: clear credential handle\n"); - s_pSecFn->FreeCredentialsHandle(&connssl->cred->cred_handle); - Curl_safefree(connssl->cred); + /* free SSPI Schannel API credential handle */ + if(connssl->cred) { + /* decrement the reference counter of the credential/session handle */ + if(connssl->cred->refcount > 0) { + connssl->cred->refcount--; + infof(data, "schannel: decremented credential handle refcount = %d\n", + connssl->cred->refcount); + } + + /* if the handle was not cached and the refcount is zero */ + if(!connssl->cred->cached && connssl->cred->refcount == 0) { + infof(data, "schannel: clear credential handle\n"); + s_pSecFn->FreeCredentialsHandle(&connssl->cred->cred_handle); + Curl_safefree(connssl->cred); + } } } @@ -1218,14 +1192,9 @@ void Curl_schannel_session_free(void *ptr) { struct curl_schannel_cred *cred = ptr; - if(cred && cred->cached) { - if(cred->refcount == 0) { - s_pSecFn->FreeCredentialsHandle(&cred->cred_handle); - Curl_safefree(cred); - } - else { - cred->cached = FALSE; - } + if(cred && cred->cached && cred->refcount == 0) { + s_pSecFn->FreeCredentialsHandle(&cred->cred_handle); + Curl_safefree(cred); } } @@ -1246,23 +1215,6 @@ size_t Curl_schannel_version(char *buffer, size_t size) return size; } -int Curl_schannel_random(unsigned char *entropy, size_t length) -{ - HCRYPTPROV hCryptProv = 0; - - if(!CryptAcquireContext(&hCryptProv, NULL, NULL, PROV_RSA_FULL, - CRYPT_VERIFYCONTEXT | CRYPT_SILENT)) - return 1; - - if(!CryptGenRandom(hCryptProv, (DWORD)length, entropy)) { - CryptReleaseContext(hCryptProv, 0UL); - return 1; - } - - CryptReleaseContext(hCryptProv, 0UL); - return 0; -} - #ifdef _WIN32_WCE static CURLcode verify_certificate(struct connectdata *conn, int sockindex) { diff --git a/lib/vtls/curl_schannel.h b/lib/vtls/curl_schannel.h index 11e83f9..b82c734 100644 --- a/lib/vtls/curl_schannel.h +++ b/lib/vtls/curl_schannel.h @@ -8,7 +8,7 @@ * \___|\___/|_| \_\_____| * * Copyright (C) 2012, Marc Hoersken, , et al. - * Copyright (C) 2012 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 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 @@ -72,8 +72,30 @@ #define SECBUFFER_ALERT 17 #endif +#ifndef ISC_RET_REPLAY_DETECT +#define ISC_RET_REPLAY_DETECT 0x00000004 +#endif + +#ifndef ISC_RET_SEQUENCE_DETECT +#define ISC_RET_SEQUENCE_DETECT 0x00000008 +#endif + +#ifndef ISC_RET_CONFIDENTIALITY +#define ISC_RET_CONFIDENTIALITY 0x00000010 +#endif + +#ifndef ISC_RET_ALLOCATED_MEMORY +#define ISC_RET_ALLOCATED_MEMORY 0x00000100 +#endif + +#ifndef ISC_RET_STREAM +#define ISC_RET_STREAM 0x00008000 +#endif + + #define CURL_SCHANNEL_BUFFER_INIT_SIZE 4096 #define CURL_SCHANNEL_BUFFER_FREE_SIZE 1024 +#define CURL_SCHANNEL_BUFFER_STEP_FACTOR 2 CURLcode Curl_schannel_connect(struct connectdata *conn, int sockindex); @@ -91,25 +113,20 @@ int Curl_schannel_init(void); void Curl_schannel_cleanup(void); size_t Curl_schannel_version(char *buffer, size_t size); -int Curl_schannel_random(unsigned char *entropy, size_t length); - /* 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_all(x) (x=x, CURLE_NOT_BUILT_IN) #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_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_schannel_version -#define curlssl_check_cxn(x) ((void)x, -1) +#define curlssl_check_cxn(x) (x=x, -1) #define curlssl_data_pending Curl_schannel_data_pending -#define CURL_SSL_BACKEND CURLSSLBACKEND_SCHANNEL -#define curlssl_random(x,y,z) ((void)x, Curl_schannel_random(y,z)) - #endif /* USE_SCHANNEL */ #endif /* HEADER_CURL_SCHANNEL_H */ diff --git a/lib/vtls/cyassl.c b/lib/vtls/cyassl.c index 3333fc3..cf93e0e 100644 --- a/lib/vtls/cyassl.c +++ b/lib/vtls/cyassl.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , 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,7 +54,6 @@ #else #include #endif -#include /* The last #include file should be: */ #include "memdebug.h" @@ -99,8 +98,10 @@ cyassl_connect_step1(struct connectdata *conn, /* check to see if we've been told to use an explicit SSL/TLS version */ switch(data->set.ssl.version) { - default: case CURL_SSLVERSION_DEFAULT: + /* we try to figure out version */ + req_method = SSLv23_client_method(); + break; case CURL_SSLVERSION_TLSv1: infof(data, "CyaSSL cannot be configured to use TLS 1.0-1.2, " "TLS 1.0 is used exclusively\n"); @@ -118,6 +119,8 @@ cyassl_connect_step1(struct connectdata *conn, case CURL_SSLVERSION_SSLv3: req_method = SSLv3_client_method(); break; + default: + req_method = TLSv1_client_method(); } if(!req_method) { @@ -141,7 +144,7 @@ cyassl_connect_step1(struct connectdata *conn, data->set.str[STRING_SSL_CAFILE], data->set.str[STRING_SSL_CAPATH])) { if(data->set.ssl.verifypeer) { - /* Fail if we insist on successfully verifying the server. */ + /* Fail if we insiste on successfully verifying the server. */ failf(data,"error setting certificate verify locations:\n" " CAfile: %s\n CApath: %s", data->set.str[STRING_SSL_CAFILE]? @@ -151,7 +154,7 @@ cyassl_connect_step1(struct connectdata *conn, return CURLE_SSL_CACERT_BADFILE; } else { - /* Just continue with a warning if no strict certificate + /* Just continue with a warning if no strict certificate verification is required. */ infof(data, "error setting certificate verify locations," " continuing anyway:\n"); @@ -296,20 +299,6 @@ cyassl_connect_step2(struct connectdata *conn, } #endif } -#if LIBCYASSL_VERSION_HEX >= 0x02007000 /* 2.7.0 */ - else if(ASN_NO_SIGNER_E == detail) { - if(data->set.ssl.verifypeer) { - failf(data, "\tCA signer not available for verification\n"); - return CURLE_SSL_CACERT_BADFILE; - } - else { - /* Just continue with a warning if no strict certificate - verification is required. */ - infof(data, "CA signer not available for verification, " - "continuing anyway\n"); - } - } -#endif else { failf(data, "SSL_connect failed with error %d: %s", detail, ERR_error_string(detail, error_buffer)); @@ -328,11 +317,11 @@ static CURLcode cyassl_connect_step3(struct connectdata *conn, int sockindex) { - CURLcode result = CURLE_OK; + CURLcode retcode = CURLE_OK; void *old_ssl_sessionid=NULL; struct SessionHandle *data = conn->data; struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - bool incache; + int incache; SSL_SESSION *our_ssl_sessionid; DEBUGASSERT(ssl_connect_3 == connssl->connecting_state); @@ -347,19 +336,18 @@ cyassl_connect_step3(struct connectdata *conn, incache = FALSE; } } - if(!incache) { - result = Curl_ssl_addsessionid(conn, our_ssl_sessionid, - 0 /* unknown size */); - if(result) { + retcode = Curl_ssl_addsessionid(conn, our_ssl_sessionid, + 0 /* unknown size */); + if(retcode) { failf(data, "failed to store ssl session"); - return result; + return retcode; } } connssl->connecting_state = ssl_connect_done; - return result; + return retcode; } @@ -504,7 +492,7 @@ cyassl_connect_common(struct connectdata *conn, bool nonblocking, bool *done) { - CURLcode result; + CURLcode retcode; struct SessionHandle *data = conn->data; struct ssl_connect_data *connssl = &conn->ssl[sockindex]; curl_socket_t sockfd = conn->sock[sockindex]; @@ -526,10 +514,9 @@ cyassl_connect_common(struct connectdata *conn, failf(data, "SSL connection timeout"); return CURLE_OPERATION_TIMEDOUT; } - - result = cyassl_connect_step1(conn, sockindex); - if(result) - return result; + retcode = cyassl_connect_step1(conn, sockindex); + if(retcode) + return retcode; } while(ssl_connect_2 == connssl->connecting_state || @@ -581,21 +568,22 @@ cyassl_connect_common(struct connectdata *conn, * ensuring that a client using select() or epoll() will always * have a valid fdset to wait on. */ - result = cyassl_connect_step2(conn, sockindex); - if(result || (nonblocking && - (ssl_connect_2 == connssl->connecting_state || - ssl_connect_2_reading == connssl->connecting_state || - ssl_connect_2_writing == connssl->connecting_state))) - return result; + retcode = cyassl_connect_step2(conn, sockindex); + if(retcode || (nonblocking && + (ssl_connect_2 == connssl->connecting_state || + ssl_connect_2_reading == connssl->connecting_state || + ssl_connect_2_writing == connssl->connecting_state))) + return retcode; + } /* repeat step2 until all transactions are done. */ - if(ssl_connect_3 == connssl->connecting_state) { - result = cyassl_connect_step3(conn, sockindex); - if(result) - return result; + if(ssl_connect_3==connssl->connecting_state) { + retcode = cyassl_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] = cyassl_recv; conn->send[sockindex] = cyassl_send; @@ -624,29 +612,16 @@ CURLcode Curl_cyassl_connect(struct connectdata *conn, int sockindex) { - CURLcode result; + CURLcode retcode; bool done = FALSE; - result = cyassl_connect_common(conn, sockindex, FALSE, &done); - if(result) - return result; + retcode = cyassl_connect_common(conn, sockindex, FALSE, &done); + if(retcode) + return retcode; DEBUGASSERT(done); return CURLE_OK; } -int Curl_cyassl_random(struct SessionHandle *data, - unsigned char *entropy, - size_t length) -{ - RNG rng; - (void)data; - if(InitRng(&rng)) - return 1; - if(RNG_GenerateBlock(&rng, entropy, length)) - return 1; - return 0; -} - #endif diff --git a/lib/vtls/cyassl.h b/lib/vtls/cyassl.h index a691e16..7728a0c 100644 --- a/lib/vtls/cyassl.h +++ b/lib/vtls/cyassl.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2011, Daniel Stenberg, , 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,9 +43,6 @@ int Curl_cyassl_init(void); CURLcode Curl_cyassl_connect_nonblocking(struct connectdata *conn, int sockindex, bool *done); -int Curl_cyassl_random(struct SessionHandle *data, - unsigned char *entropy, - size_t length); /* API setup for CyaSSL */ #define curlssl_init Curl_cyassl_init @@ -56,14 +53,12 @@ int Curl_cyassl_random(struct SessionHandle *data, #define curlssl_close_all Curl_cyassl_close_all #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_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_cyassl_version -#define curlssl_check_cxn(x) ((void)x, -1) +#define curlssl_check_cxn(x) (x=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 CURL_SSL_BACKEND CURLSSLBACKEND_CYASSL #endif /* USE_CYASSL */ #endif /* HEADER_CURL_CYASSL_H */ diff --git a/lib/vtls/gskit.c b/lib/vtls/gskit.c index ac05f05..0f8b08f 100644 --- a/lib/vtls/gskit.c +++ b/lib/vtls/gskit.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , 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,12 +134,8 @@ static const gskit_cipher ciphertable[] = { CURL_GSKPROTO_TLSV10_MASK | CURL_GSKPROTO_TLSV11_MASK | CURL_GSKPROTO_TLSV12_MASK }, { "null-sha256", "3B", CURL_GSKPROTO_TLSV12_MASK }, - { "aes128-sha256", "3C", CURL_GSKPROTO_TLSV12_MASK }, + { "aes128-sha256", "3D", CURL_GSKPROTO_TLSV12_MASK }, { "aes256-sha256", "3D", CURL_GSKPROTO_TLSV12_MASK }, - { "aes128-gcm-sha256", - "9C", CURL_GSKPROTO_TLSV12_MASK }, - { "aes256-gcm-sha384", - "9D", CURL_GSKPROTO_TLSV12_MASK }, { "rc4-md5", "1", CURL_GSKPROTO_SSLV2_MASK }, { "exp-rc4-md5", "2", CURL_GSKPROTO_SSLV2_MASK }, { "rc2-md5", "3", CURL_GSKPROTO_SSLV2_MASK }, @@ -168,6 +164,8 @@ static bool is_separator(char c) static CURLcode gskit_status(struct SessionHandle *data, int rc, const char *procname, CURLcode defcode) { + CURLcode cc; + /* Process GSKit status and map it to a CURLcode. */ switch (rc) { case GSK_OK: @@ -300,7 +298,7 @@ static CURLcode set_ciphers(struct SessionHandle *data, int i; int l; bool unsupported; - CURLcode result; + CURLcode cc; struct { char *buf; char *ptr; @@ -333,7 +331,7 @@ static CURLcode set_ciphers(struct SessionHandle *data, /* Process each cipher in input string. */ unsupported = FALSE; - result = CURLE_OK; + cc = CURLE_OK; for(;;) { for(clp = cipherlist; *cipherlist && !is_separator(*cipherlist);) cipherlist++; @@ -346,7 +344,7 @@ static CURLcode set_ciphers(struct SessionHandle *data, break; if(!ctp->name) { failf(data, "Unknown cipher %.*s", l, clp); - result = CURLE_SSL_CIPHER; + cc = CURLE_SSL_CIPHER; } else { unsupported |= !(ctp->versions & (CURL_GSKPROTO_SSLV2_MASK | @@ -374,53 +372,53 @@ static CURLcode set_ciphers(struct SessionHandle *data, /* Try to set-up TLSv1.1 and TLSv2.1 ciphers. */ if(*protoflags & CURL_GSKPROTO_TLSV11_MASK) { - result = set_buffer(data, h, GSK_TLSV11_CIPHER_SPECS, - ciphers[CURL_GSKPROTO_TLSV11].buf, TRUE); - if(result == CURLE_UNSUPPORTED_PROTOCOL) { - result = CURLE_OK; + cc = set_buffer(data, h, GSK_TLSV11_CIPHER_SPECS, + ciphers[CURL_GSKPROTO_TLSV11].buf, TRUE); + if(cc == CURLE_UNSUPPORTED_PROTOCOL) { + cc = CURLE_OK; if(unsupported) { failf(data, "TLSv1.1-only ciphers are not yet supported"); - result = CURLE_SSL_CIPHER; + cc = CURLE_SSL_CIPHER; } } } - if(!result && (*protoflags & CURL_GSKPROTO_TLSV12_MASK)) { - result = set_buffer(data, h, GSK_TLSV12_CIPHER_SPECS, - ciphers[CURL_GSKPROTO_TLSV12].buf, TRUE); - if(result == CURLE_UNSUPPORTED_PROTOCOL) { - result = CURLE_OK; + if(cc == CURLE_OK && (*protoflags & CURL_GSKPROTO_TLSV12_MASK)) { + cc = set_buffer(data, h, GSK_TLSV12_CIPHER_SPECS, + ciphers[CURL_GSKPROTO_TLSV12].buf, TRUE); + if(cc == CURLE_UNSUPPORTED_PROTOCOL) { + cc = CURLE_OK; if(unsupported) { failf(data, "TLSv1.2-only ciphers are not yet supported"); - result = CURLE_SSL_CIPHER; + cc = CURLE_SSL_CIPHER; } } } /* Try to set-up TLSv1.0 ciphers. If not successful, concatenate them to the SSLv3 ciphers. OS/400 prior to version 7.1 will understand it. */ - if(!result && (*protoflags & CURL_GSKPROTO_TLSV10_MASK)) { - result = set_buffer(data, h, GSK_TLSV10_CIPHER_SPECS, - ciphers[CURL_GSKPROTO_TLSV10].buf, TRUE); - if(result == CURLE_UNSUPPORTED_PROTOCOL) { - result = CURLE_OK; + if(cc == CURLE_OK && (*protoflags & CURL_GSKPROTO_TLSV10_MASK)) { + cc = set_buffer(data, h, GSK_TLSV10_CIPHER_SPECS, + ciphers[CURL_GSKPROTO_TLSV10].buf, TRUE); + if(cc == CURLE_UNSUPPORTED_PROTOCOL) { + cc = CURLE_OK; strcpy(ciphers[CURL_GSKPROTO_SSLV3].ptr, ciphers[CURL_GSKPROTO_TLSV10].ptr); } } /* Set-up other ciphers. */ - if(!result && (*protoflags & CURL_GSKPROTO_SSLV3_MASK)) - result = set_buffer(data, h, GSK_V3_CIPHER_SPECS, - ciphers[CURL_GSKPROTO_SSLV3].buf, FALSE); - if(!result && (*protoflags & CURL_GSKPROTO_SSLV2_MASK)) - result = set_buffer(data, h, GSK_V2_CIPHER_SPECS, - ciphers[CURL_GSKPROTO_SSLV2].buf, FALSE); + if(cc == CURLE_OK && (*protoflags & CURL_GSKPROTO_SSLV3_MASK)) + cc = set_buffer(data, h, GSK_V3_CIPHER_SPECS, + ciphers[CURL_GSKPROTO_SSLV3].buf, FALSE); + if(cc == CURLE_OK && (*protoflags & CURL_GSKPROTO_SSLV2_MASK)) + cc = set_buffer(data, h, GSK_V2_CIPHER_SPECS, + ciphers[CURL_GSKPROTO_SSLV2].buf, FALSE); /* Clean-up. */ for(i = 0; i < CURL_GSKPROTO_LAST; i++) free(ciphers[i].buf); - return result; + return cc; } @@ -444,7 +442,7 @@ static CURLcode init_environment(struct SessionHandle *data, const char *password) { int rc; - CURLcode result; + CURLcode c; gsk_handle h; /* Creates the GSKit environment. */ @@ -460,29 +458,29 @@ static CURLcode init_environment(struct SessionHandle *data, return CURLE_SSL_CONNECT_ERROR; } - result = set_enum(data, h, GSK_SESSION_TYPE, GSK_CLIENT_SESSION, FALSE); - if(!result && appid) - result = set_buffer(data, h, GSK_OS400_APPLICATION_ID, appid, FALSE); - if(!result && file) - result = set_buffer(data, h, GSK_KEYRING_FILE, file, FALSE); - if(!result && label) - result = set_buffer(data, h, GSK_KEYRING_LABEL, label, FALSE); - if(!result && password) - result = set_buffer(data, h, GSK_KEYRING_PW, password, FALSE); - - if(!result) { + c = set_enum(data, h, GSK_SESSION_TYPE, GSK_CLIENT_SESSION, FALSE); + if(c == CURLE_OK && appid) + c = set_buffer(data, h, GSK_OS400_APPLICATION_ID, appid, FALSE); + if(c == CURLE_OK && file) + c = set_buffer(data, h, GSK_KEYRING_FILE, file, FALSE); + if(c == CURLE_OK && label) + c = set_buffer(data, h, GSK_KEYRING_LABEL, label, FALSE); + if(c == CURLE_OK && password) + c = set_buffer(data, h, GSK_KEYRING_PW, password, FALSE); + + if(c == CURLE_OK) { /* Locate CAs, Client certificate and key according to our settings. Note: this call may be blocking for some tenths of seconds. */ - result = gskit_status(data, gsk_environment_init(h), - "gsk_environment_init()", CURLE_SSL_CERTPROBLEM); - if(!result) { + c = gskit_status(data, gsk_environment_init(h), + "gsk_environment_init()", CURLE_SSL_CERTPROBLEM); + if(c == CURLE_OK) { *envir = h; - return result; + return c; } } /* Error: rollback. */ gsk_environment_close(&h); - return result; + return c; } @@ -560,7 +558,7 @@ static CURLcode gskit_connect_step1(struct connectdata *conn, int sockindex) struct SessionHandle *data = conn->data; struct ssl_connect_data *connssl = &conn->ssl[sockindex]; gsk_handle envir; - CURLcode result; + CURLcode cc; int rc; char *keyringfile; char *keyringpwd; @@ -602,22 +600,22 @@ static CURLcode gskit_connect_step1(struct connectdata *conn, int sockindex) if(!envir) { /* Use keyring mode. */ - result = init_environment(data, &envir, (const char *) NULL, - keyringfile, keyringlabel, keyringpwd); - if(result) - return result; + cc = init_environment(data, &envir, (const char *) NULL, + keyringfile, keyringlabel, keyringpwd); + if(cc != CURLE_OK) + return cc; } /* Create secure session. */ - result = gskit_status(data, gsk_secure_soc_open(envir, &connssl->handle), - "gsk_secure_soc_open()", CURLE_SSL_CONNECT_ERROR); + cc = gskit_status(data, gsk_secure_soc_open(envir, &connssl->handle), + "gsk_secure_soc_open()", CURLE_SSL_CONNECT_ERROR); gsk_environment_close(&envir); - if(result) - return result; + if(cc != CURLE_OK) + return cc; /* Determine which SSL/TLS version should be enabled. */ - protoflags = CURL_GSKPROTO_TLSV10_MASK | CURL_GSKPROTO_TLSV11_MASK | - CURL_GSKPROTO_TLSV12_MASK; + protoflags = CURL_GSKPROTO_SSLV3_MASK | CURL_GSKPROTO_TLSV10_MASK | + CURL_GSKPROTO_TLSV11_MASK | CURL_GSKPROTO_TLSV12_MASK; sni = conn->host.name; switch (data->set.ssl.version) { case CURL_SSLVERSION_SSLv2: @@ -645,84 +643,81 @@ 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, - GSK_SSL_EXTN_SERVERNAME_REQUEST, sni, TRUE); - if(result == CURLE_UNSUPPORTED_PROTOCOL) - result = CURLE_OK; + cc = set_buffer(data, connssl->handle, + GSK_SSL_EXTN_SERVERNAME_REQUEST, sni, TRUE); + if(cc == CURLE_UNSUPPORTED_PROTOCOL) + cc = CURLE_OK; } /* Set session parameters. */ - if(!result) { + if(cc == CURLE_OK) { /* Compute the handshake timeout. Since GSKit granularity is 1 second, we round up the required value. */ timeout = Curl_timeleft(data, NULL, TRUE); if(timeout < 0) - result = CURLE_OPERATION_TIMEDOUT; + cc = CURLE_OPERATION_TIMEDOUT; else - result = set_numeric(data, connssl->handle, GSK_HANDSHAKE_TIMEOUT, - (timeout + 999) / 1000); + cc = set_numeric(data, connssl->handle, GSK_HANDSHAKE_TIMEOUT, + (timeout + 999) / 1000); } - if(!result) - result = set_numeric(data, connssl->handle, GSK_FD, conn->sock[sockindex]); - if(!result) - result = set_ciphers(data, connssl->handle, &protoflags); + if(cc == CURLE_OK) + cc = set_numeric(data, connssl->handle, GSK_FD, conn->sock[sockindex]); + if(cc == CURLE_OK) + cc = set_ciphers(data, connssl->handle, &protoflags); if(!protoflags) { failf(data, "No SSL protocol/cipher combination enabled"); - result = CURLE_SSL_CIPHER; + cc = CURLE_SSL_CIPHER; } - if(!result) - result = set_enum(data, connssl->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, - (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, - (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, - (protoflags & CURL_GSKPROTO_TLSV11_MASK)? - GSK_TRUE: GSK_FALSE, TRUE); - if(result == CURLE_UNSUPPORTED_PROTOCOL) { - result = CURLE_OK; + if(cc == CURLE_OK) + cc = set_enum(data, connssl->handle, GSK_PROTOCOL_SSLV2, + (protoflags & CURL_GSKPROTO_SSLV2_MASK)? + GSK_PROTOCOL_SSLV2_ON: GSK_PROTOCOL_SSLV2_OFF, FALSE); + if(cc == CURLE_OK) + cc = set_enum(data, connssl->handle, GSK_PROTOCOL_SSLV3, + (protoflags & CURL_GSKPROTO_SSLV3_MASK)? + GSK_PROTOCOL_SSLV3_ON: GSK_PROTOCOL_SSLV3_OFF, FALSE); + if(cc == CURLE_OK) + cc = set_enum(data, connssl->handle, GSK_PROTOCOL_TLSV1, + (protoflags & CURL_GSKPROTO_TLSV10_MASK)? + GSK_PROTOCOL_TLSV1_ON: GSK_PROTOCOL_TLSV1_OFF, FALSE); + if(cc == CURLE_OK) { + cc = set_enum(data, connssl->handle, GSK_PROTOCOL_TLSV11, + (protoflags & CURL_GSKPROTO_TLSV11_MASK)? + GSK_TRUE: GSK_FALSE, TRUE); + if(cc == CURLE_UNSUPPORTED_PROTOCOL) { + cc = CURLE_OK; if(protoflags == CURL_GSKPROTO_TLSV11_MASK) { failf(data, "TLS 1.1 not yet supported"); - result = CURLE_SSL_CIPHER; + cc = CURLE_SSL_CIPHER; } } } - if(!result) { - result = set_enum(data, connssl->handle, GSK_PROTOCOL_TLSV12, - (protoflags & CURL_GSKPROTO_TLSV12_MASK)? - GSK_TRUE: GSK_FALSE, TRUE); - if(result == CURLE_UNSUPPORTED_PROTOCOL) { - result = CURLE_OK; + if(cc == CURLE_OK) { + cc = set_enum(data, connssl->handle, GSK_PROTOCOL_TLSV12, + (protoflags & CURL_GSKPROTO_TLSV12_MASK)? + GSK_TRUE: GSK_FALSE, TRUE); + if(cc == CURLE_UNSUPPORTED_PROTOCOL) { + cc = CURLE_OK; if(protoflags == CURL_GSKPROTO_TLSV12_MASK) { failf(data, "TLS 1.2 not yet supported"); - result = CURLE_SSL_CIPHER; + cc = CURLE_SSL_CIPHER; } } } - if(!result) - result = set_enum(data, connssl->handle, GSK_SERVER_AUTH_TYPE, - data->set.ssl.verifypeer? GSK_SERVER_AUTH_FULL: - GSK_SERVER_AUTH_PASSTHRU, FALSE); + if(cc == CURLE_OK) + cc = set_enum(data, connssl->handle, GSK_SERVER_AUTH_TYPE, + data->set.ssl.verifypeer? GSK_SERVER_AUTH_FULL: + GSK_SERVER_AUTH_PASSTHRU, FALSE); - if(!result) { + if(cc == CURLE_OK) { /* Start handshake. Try asynchronous first. */ memset(&commarea, 0, sizeof commarea); connssl->iocport = QsoCreateIOCompletionPort(); if(connssl->iocport != -1) { - result = gskit_status(data, - gsk_secure_soc_startInit(connssl->handle, - connssl->iocport, - &commarea), - "gsk_secure_soc_startInit()", - CURLE_SSL_CONNECT_ERROR); - if(!result) { + cc = gskit_status(data, gsk_secure_soc_startInit(connssl->handle, + connssl->iocport, &commarea), + "gsk_secure_soc_startInit()", CURLE_SSL_CONNECT_ERROR); + if(cc == CURLE_OK) { connssl->connecting_state = ssl_connect_2; return CURLE_OK; } @@ -730,13 +725,12 @@ static CURLcode gskit_connect_step1(struct connectdata *conn, int sockindex) close_async_handshake(connssl); } else if(errno != ENOBUFS) - result = gskit_status(data, GSK_ERROR_IO, - "QsoCreateIOCompletionPort()", 0); + cc = gskit_status(data, GSK_ERROR_IO, "QsoCreateIOCompletionPort()", 0); else { /* No more completion port available. Use synchronous IO. */ - result = gskit_status(data, gsk_secure_soc_init(connssl->handle), - "gsk_secure_soc_init()", CURLE_SSL_CONNECT_ERROR); - if(!result) { + cc = gskit_status(data, gsk_secure_soc_init(connssl->handle), + "gsk_secure_soc_init()", CURLE_SSL_CONNECT_ERROR); + if(cc == CURLE_OK) { connssl->connecting_state = ssl_connect_3; return CURLE_OK; } @@ -745,7 +739,7 @@ static CURLcode gskit_connect_step1(struct connectdata *conn, int sockindex) /* Error: rollback. */ close_one(connssl, data); - return result; + return cc; } @@ -757,7 +751,7 @@ static CURLcode gskit_connect_step2(struct connectdata *conn, int sockindex, Qso_OverlappedIO_t cstat; long timeout_ms; struct timeval stmv; - CURLcode result; + CURLcode cc; /* Poll or wait for end of SSL asynchronous handshake. */ @@ -792,12 +786,12 @@ static CURLcode gskit_connect_step2(struct connectdata *conn, int sockindex, } break; } - result = gskit_status(data, cstat.returnValue, "SSL handshake", - CURLE_SSL_CONNECT_ERROR); - if(!result) + cc = gskit_status(data, cstat.returnValue, "SSL handshake", + CURLE_SSL_CONNECT_ERROR); + if(cc == CURLE_OK) connssl->connecting_state = ssl_connect_3; close_async_handshake(connssl); - return result; + return cc; } @@ -810,9 +804,8 @@ static CURLcode gskit_connect_step3(struct connectdata *conn, int sockindex) const gsk_cert_data_elem *p; const char *cert = (const char *) NULL; const char *certend; - const char *ptr; int i; - CURLcode result; + CURLcode cc; /* SSL handshake done: gather certificate info and verify host. */ @@ -845,9 +838,9 @@ static CURLcode gskit_connect_step3(struct connectdata *conn, int sockindex) } /* Verify host. */ - result = Curl_verifyhost(conn, cert, certend); - if(result) - return result; + cc = Curl_verifyhost(conn, cert, certend); + if(cc != CURLE_OK) + return cc; /* The only place GSKit can get the whole CA chain is a validation callback where no user data pointer is available. Therefore it's not @@ -855,31 +848,12 @@ static CURLcode gskit_connect_step3(struct connectdata *conn, int sockindex) However the server certificate may be available, thus we can return info about it. */ if(data->set.ssl.certinfo) { - result = Curl_ssl_init_certinfo(data, 1); - if(result) - return result; - + if(Curl_ssl_init_certinfo(data, 1)) + return CURLE_OUT_OF_MEMORY; if(cert) { - result = Curl_extract_certinfo(conn, 0, cert, certend); - if(result) - return result; - } - } - - /* Check pinned public key. */ - ptr = data->set.str[STRING_SSL_PINNEDPUBLICKEY]; - if(!result && ptr) { - curl_X509certificate x509; - curl_asn1Element *p; - - if(!cert) - return CURLE_SSL_PINNEDPUBKEYNOTMATCH; - Curl_parseX509(&x509, cert, certend); - p = &x509.subjectPublicKeyInfo; - result = Curl_pin_peer_pubkey(ptr, p->header, p->end - p->header); - if(result) { - failf(data, "SSL: public key does not match pinned public key!"); - return result; + cc = Curl_extract_certinfo(conn, 0, cert, certend); + if(cc != CURLE_OK) + return cc; } } @@ -895,7 +869,7 @@ static CURLcode gskit_connect_common(struct connectdata *conn, int sockindex, struct ssl_connect_data *connssl = &conn->ssl[sockindex]; long timeout_ms; Qso_OverlappedIO_t cstat; - CURLcode result = CURLE_OK; + CURLcode cc = CURLE_OK; *done = connssl->state == ssl_connection_complete; if(*done) @@ -909,31 +883,31 @@ static CURLcode gskit_connect_common(struct connectdata *conn, int sockindex, if(timeout_ms < 0) { /* no need to continue if time already is up */ failf(data, "SSL connection timeout"); - result = CURLE_OPERATION_TIMEDOUT; + cc = CURLE_OPERATION_TIMEDOUT; } else - result = gskit_connect_step1(conn, sockindex); + cc = gskit_connect_step1(conn, sockindex); } /* Step 2: check if handshake is over. */ - if(!result && connssl->connecting_state == ssl_connect_2) { + if(cc == CURLE_OK && connssl->connecting_state == ssl_connect_2) { /* check allowed time left */ timeout_ms = Curl_timeleft(data, NULL, TRUE); if(timeout_ms < 0) { /* no need to continue if time already is up */ failf(data, "SSL connection timeout"); - result = CURLE_OPERATION_TIMEDOUT; + cc = CURLE_OPERATION_TIMEDOUT; } else - result = gskit_connect_step2(conn, sockindex, nonblocking); + cc = gskit_connect_step2(conn, sockindex, nonblocking); } /* Step 3: gather certificate info, verify host. */ - if(!result && connssl->connecting_state == ssl_connect_3) - result = gskit_connect_step3(conn, sockindex); + if(cc == CURLE_OK && connssl->connecting_state == ssl_connect_3) + cc = gskit_connect_step3(conn, sockindex); - if(result) + if(cc != CURLE_OK) close_one(connssl, data); else if(connssl->connecting_state == ssl_connect_done) { connssl->state = ssl_connection_complete; @@ -943,7 +917,7 @@ static CURLcode gskit_connect_common(struct connectdata *conn, int sockindex, *done = TRUE; } - return result; + return cc; } @@ -951,24 +925,24 @@ CURLcode Curl_gskit_connect_nonblocking(struct connectdata *conn, int sockindex, bool *done) { - CURLcode result; + CURLcode cc; - result = gskit_connect_common(conn, sockindex, TRUE, done); - if(*done || result) + cc = gskit_connect_common(conn, sockindex, TRUE, done); + if(*done || cc != CURLE_OK) conn->ssl[sockindex].connecting_state = ssl_connect_1; - return result; + return cc; } CURLcode Curl_gskit_connect(struct connectdata *conn, int sockindex) { - CURLcode result; + CURLcode retcode; bool done; conn->ssl[sockindex].connecting_state = ssl_connect_1; - result = gskit_connect_common(conn, sockindex, FALSE, &done); - if(result) - return result; + retcode = gskit_connect_common(conn, sockindex, FALSE, &done); + if(retcode) + return retcode; DEBUGASSERT(done); @@ -986,10 +960,11 @@ void Curl_gskit_close(struct connectdata *conn, int sockindex) } -void Curl_gskit_close_all(struct SessionHandle *data) +int Curl_gskit_close_all(struct SessionHandle *data) { /* Unimplemented. */ (void) data; + return 0; } diff --git a/lib/vtls/gskit.h b/lib/vtls/gskit.h index baec823..7c50452 100644 --- a/lib/vtls/gskit.h +++ b/lib/vtls/gskit.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , 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,15 +36,12 @@ 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); -void Curl_gskit_close_all(struct SessionHandle * data); +int Curl_gskit_close_all(struct SessionHandle * data); 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); -/* 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 @@ -62,8 +59,6 @@ int Curl_gskit_check_cxn(struct connectdata * cxn); #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) -1 -#define CURL_SSL_BACKEND CURLSSLBACKEND_GSKIT #endif /* USE_GSKIT */ #endif /* HEADER_CURL_GSKIT_H */ diff --git a/lib/vtls/gtls.c b/lib/vtls/gtls.c index 550a0ed..e9f60b5 100644 --- a/lib/vtls/gtls.c +++ b/lib/vtls/gtls.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * 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 @@ -32,7 +32,6 @@ #ifdef USE_GNUTLS -#include #include #include @@ -98,14 +97,6 @@ static bool gtls_inited = FALSE; # define HAS_ALPN # endif # endif - -# if (GNUTLS_VERSION_NUMBER >= 0x03020d) -# define HAS_OCSP -# endif -#endif - -#ifdef HAS_OCSP -# include #endif /* @@ -315,6 +306,8 @@ static CURLcode handshake(struct connectdata *conn, gnutls_record_get_direction(session)? ssl_connect_2_writing:ssl_connect_2_reading; continue; + if(nonblocking) + return CURLE_OK; } else if((rc < 0) && !gnutls_error_is_fatal(rc)) { const char *strerr = NULL; @@ -626,7 +619,6 @@ gtls_connect_step1(struct connectdata *conn, gnutls_alpn_set_protocols(session, protocols, protocols_size, 0); infof(data, "ALPN, offering %s, %s\n", NGHTTP2_PROTO_VERSION_ID, ALPN_HTTP_1_1); - connssl->asked_for_h2 = TRUE; } else { infof(data, "SSL, can't negotiate HTTP/2.0 without ALPN\n"); @@ -671,16 +663,6 @@ gtls_connect_step1(struct connectdata *conn, /* lowat must be set to zero when using custom push and pull functions. */ gnutls_transport_set_lowat(session, 0); -#ifdef HAS_OCSP - if(data->set.ssl.verifystatus) { - rc = gnutls_ocsp_status_request_enable_client(session, NULL, 0, NULL); - if(rc != GNUTLS_E_SUCCESS) { - failf(data, "gnutls_ocsp_status_request_enable_client() failed: %d", rc); - return CURLE_SSL_CONNECT_ERROR; - } - } -#endif - /* This might be a reconnect, so we check for a session ID in the cache to speed up things */ @@ -695,62 +677,6 @@ gtls_connect_step1(struct connectdata *conn, return CURLE_OK; } -static CURLcode pkp_pin_peer_pubkey(gnutls_x509_crt_t cert, - const char *pinnedpubkey) -{ - /* Scratch */ - size_t len1 = 0, len2 = 0; - unsigned char *buff1 = NULL; - - gnutls_pubkey_t key = NULL; - - /* Result is returned to caller */ - int ret = 0; - CURLcode result = CURLE_SSL_PINNEDPUBKEYNOTMATCH; - - /* if a path wasn't specified, don't pin */ - if(NULL == pinnedpubkey) - return CURLE_OK; - - if(NULL == cert) - return result; - - do { - /* Begin Gyrations to get the public key */ - gnutls_pubkey_init(&key); - - ret = gnutls_pubkey_import_x509(key, cert, 0); - if(ret < 0) - break; /* failed */ - - ret = gnutls_pubkey_export(key, GNUTLS_X509_FMT_DER, NULL, &len1); - if(ret != GNUTLS_E_SHORT_MEMORY_BUFFER || len1 == 0) - break; /* failed */ - - buff1 = malloc(len1); - if(NULL == buff1) - break; /* failed */ - - len2 = len1; - - ret = gnutls_pubkey_export(key, GNUTLS_X509_FMT_DER, buff1, &len2); - if(ret < 0 || len1 != len2) - break; /* failed */ - - /* End Gyrations */ - - /* The one good exit point */ - result = Curl_pin_peer_pubkey(pinnedpubkey, buff1, len1); - } while(0); - - if(NULL != key) - gnutls_pubkey_deinit(key); - - Curl_safefree(buff1); - - return result; -} - static Curl_recv gtls_recv; static Curl_send gtls_send; @@ -772,7 +698,7 @@ gtls_connect_step3(struct connectdata *conn, struct SessionHandle *data = conn->data; gnutls_session_t session = conn->ssl[sockindex].session; int rc; - bool incache; + int incache; void *ssl_sessionid; #ifdef HAS_ALPN gnutls_datum_t proto; @@ -840,23 +766,6 @@ gtls_connect_step3(struct connectdata *conn, else infof(data, "\t server certificate verification SKIPPED\n"); -#ifdef HAS_OCSP - if(data->set.ssl.verifystatus) { - if(gnutls_ocsp_status_request_is_checked(session, 0) == 0) { - if(verify_status & GNUTLS_CERT_REVOKED) - failf(data, "SSL server certificate was REVOKED\n"); - else - failf(data, "SSL server certificate status verification FAILED"); - - return CURLE_SSL_INVALIDCERTSTATUS; - } - else - infof(data, "SSL server certificate status verification OK\n"); - } - else - infof(data, "SSL server certificate status verification SKIPPED\n"); -#endif - /* initialize an X.509 certificate structure. */ gnutls_x509_crt_init(&x509_cert); @@ -870,12 +779,10 @@ gtls_connect_step3(struct connectdata *conn, issuerp = load_file(data->set.ssl.issuercert); gnutls_x509_crt_import(x509_issuer, &issuerp, GNUTLS_X509_FMT_PEM); rc = gnutls_x509_crt_check_issuer(x509_cert,x509_issuer); - gnutls_x509_crt_deinit(x509_issuer); unload_file(issuerp); if(rc <= 0) { failf(data, "server certificate issuer check failed (IssuerCert: %s)", data->set.ssl.issuercert?data->set.ssl.issuercert:"none"); - gnutls_x509_crt_deinit(x509_cert); return CURLE_SSL_ISSUER_ERROR; } infof(data,"\t server certificate issuer check OK (Issuer Cert: %s)\n", @@ -961,7 +868,6 @@ gtls_connect_step3(struct connectdata *conn, if(certclock == (time_t)-1) { if(data->set.ssl.verifypeer) { failf(data, "server cert expiration date verify failed"); - gnutls_x509_crt_deinit(x509_cert); return CURLE_SSL_CONNECT_ERROR; } else @@ -971,7 +877,6 @@ gtls_connect_step3(struct connectdata *conn, if(certclock < time(NULL)) { if(data->set.ssl.verifypeer) { failf(data, "server certificate expiration date has passed."); - gnutls_x509_crt_deinit(x509_cert); return CURLE_PEER_FAILED_VERIFICATION; } else @@ -986,7 +891,6 @@ gtls_connect_step3(struct connectdata *conn, if(certclock == (time_t)-1) { if(data->set.ssl.verifypeer) { failf(data, "server cert activation date verify failed"); - gnutls_x509_crt_deinit(x509_cert); return CURLE_SSL_CONNECT_ERROR; } else @@ -996,7 +900,6 @@ gtls_connect_step3(struct connectdata *conn, if(certclock > time(NULL)) { if(data->set.ssl.verifypeer) { failf(data, "server certificate not activated yet."); - gnutls_x509_crt_deinit(x509_cert); return CURLE_PEER_FAILED_VERIFICATION; } else @@ -1006,16 +909,6 @@ gtls_connect_step3(struct connectdata *conn, infof(data, "\t server certificate activation date OK\n"); } - ptr = data->set.str[STRING_SSL_PINNEDPUBLICKEY]; - if(ptr) { - result = pkp_pin_peer_pubkey(x509_cert, ptr); - if(result != CURLE_OK) { - failf(data, "SSL: public key does not match pinned public key!"); - gnutls_x509_crt_deinit(x509_cert); - return result; - } - } - /* Show: - ciphers used @@ -1083,7 +976,7 @@ gtls_connect_step3(struct connectdata *conn, conn->negnpn = NPN_HTTP1_1; } } - else if(connssl->asked_for_h2) { + else { infof(data, "ALPN, server did not agree to a protocol\n"); } } @@ -1186,12 +1079,12 @@ Curl_gtls_connect(struct connectdata *conn, int sockindex) { - CURLcode result; + CURLcode retcode; bool done = FALSE; - result = gtls_connect_common(conn, sockindex, FALSE, &done); - if(result) - return result; + retcode = gtls_connect_common(conn, sockindex, FALSE, &done); + if(retcode) + return retcode; DEBUGASSERT(done); @@ -1339,10 +1232,10 @@ static ssize_t gtls_recv(struct connectdata *conn, /* connection data */ if(ret == GNUTLS_E_REHANDSHAKE) { /* BLOCKING call, this is bad but a work-around for now. Fixing this "the proper way" takes a whole lot of work. */ - CURLcode result = handshake(conn, num, FALSE, FALSE); - if(result) + CURLcode rc = handshake(conn, num, FALSE, FALSE); + if(rc) /* handshake() writes error message on its own */ - *curlcode = result; + *curlcode = rc; else *curlcode = CURLE_AGAIN; /* then return as if this was a wouldblock */ return -1; @@ -1368,15 +1261,16 @@ size_t Curl_gtls_version(char *buffer, size_t size) return snprintf(buffer, size, "GnuTLS/%s", gnutls_check_version(NULL)); } -#ifndef USE_GNUTLS_NETTLE -static int Curl_gtls_seed(struct SessionHandle *data) +int Curl_gtls_seed(struct SessionHandle *data) { /* we have the "SSL is seeded" boolean static to prevent multiple time-consuming seedings in vain */ static bool ssl_seeded = FALSE; /* Quickly add a bit of entropy */ +#ifndef USE_GNUTLS_NETTLE gcry_fast_random_poll(); +#endif if(!ssl_seeded || data->set.str[STRING_SSL_RANDOM_FILE] || data->set.str[STRING_SSL_EGDSOCKET]) { @@ -1390,22 +1284,18 @@ static int Curl_gtls_seed(struct SessionHandle *data) } return 0; } -#endif -/* data might be NULL! */ -int Curl_gtls_random(struct SessionHandle *data, - unsigned char *entropy, - size_t length) +void Curl_gtls_random(struct SessionHandle *data, + unsigned char *entropy, + size_t length) { #if defined(USE_GNUTLS_NETTLE) (void)data; gnutls_rnd(GNUTLS_RND_RANDOM, entropy, length); #elif defined(USE_GNUTLS) - if(data) - Curl_gtls_seed(data); /* Initiate the seed if not already done */ + Curl_gtls_seed(data); /* Initiate the seed if not already done */ gcry_randomize(entropy, length, GCRY_STRONG_RANDOM); #endif - return 0; } void Curl_gtls_md5sum(unsigned char *tmp, /* input */ @@ -1427,13 +1317,4 @@ void Curl_gtls_md5sum(unsigned char *tmp, /* input */ #endif } -bool Curl_gtls_cert_status_request(void) -{ -#ifdef HAS_OCSP - return TRUE; -#else - return FALSE; -#endif -} - #endif /* USE_GNUTLS */ diff --git a/lib/vtls/gtls.h b/lib/vtls/gtls.h index 356acce..453542e 100644 --- a/lib/vtls/gtls.h +++ b/lib/vtls/gtls.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , 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,19 @@ 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); -int Curl_gtls_random(struct SessionHandle *data, - unsigned char *entropy, - size_t length); +int Curl_gtls_seed(struct SessionHandle *data); + +void Curl_gtls_random(struct SessionHandle *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); -bool Curl_gtls_cert_status_request(void); +/* this backend provides these functions: */ +#define have_curlssl_random 1 +#define have_curlssl_md5sum 1 /* API setup for GnuTLS */ #define curlssl_init Curl_gtls_init @@ -64,16 +68,14 @@ bool Curl_gtls_cert_status_request(void); #define curlssl_close_all Curl_gtls_close_all #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_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_gtls_version -#define curlssl_check_cxn(x) ((void)x, -1) -#define curlssl_data_pending(x,y) ((void)x, (void)y, 0) +#define curlssl_check_cxn(x) (x=x, -1) +#define curlssl_data_pending(x,y) (x=x, y=y, 0) #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_cert_status_request() Curl_gtls_cert_status_request() -#define CURL_SSL_BACKEND CURLSSLBACKEND_GNUTLS #endif /* USE_GNUTLS */ #endif /* HEADER_CURL_GTLS_H */ diff --git a/lib/vtls/nss.c b/lib/vtls/nss.c index 519a61e..1e12d3d 100644 --- a/lib/vtls/nss.c +++ b/lib/vtls/nss.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * 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 @@ -60,12 +60,6 @@ #include #include -#define NSSVERNUM ((NSS_VMAJOR<<16)|(NSS_VMINOR<<8)|NSS_VPATCH) - -#if NSSVERNUM >= 0x030f00 /* 3.15.0 */ -#include -#endif - #include "curl_memory.h" #include "rawstr.h" #include "warnless.h" @@ -349,7 +343,7 @@ static CURLcode nss_create_object(struct ssl_connect_data *ssl, CK_BBOOL ckfalse = CK_FALSE; CK_ATTRIBUTE attrs[/* max count of attributes */ 4]; int attr_cnt = 0; - CURLcode result = (cacert) + CURLcode err = (cacert) ? CURLE_SSL_CACERT_BADFILE : CURLE_SSL_CERTPROBLEM; @@ -361,7 +355,7 @@ static CURLcode nss_create_object(struct ssl_connect_data *ssl, slot = PK11_FindSlotByName(slot_name); free(slot_name); if(!slot) - return result; + return err; PK11_SETATTRS(attrs, attr_cnt, CKA_CLASS, &obj_class, sizeof(obj_class)); PK11_SETATTRS(attrs, attr_cnt, CKA_TOKEN, &cktrue, sizeof(CK_BBOOL)); @@ -376,7 +370,7 @@ static CURLcode nss_create_object(struct ssl_connect_data *ssl, obj = PK11_CreateGenericObject(slot, attrs, attr_cnt, PR_FALSE); PK11_FreeSlot(slot); if(!obj) - return result; + return err; if(!Curl_llist_insert_next(ssl->obj_list, ssl->obj_list->tail, obj)) { PK11_DestroyGenericObject(obj); @@ -411,16 +405,16 @@ static void nss_destroy_crl_item(void *user, void *ptr) static CURLcode nss_load_cert(struct ssl_connect_data *ssl, const char *filename, PRBool cacert) { - CURLcode result = (cacert) + CURLcode err = (cacert) ? CURLE_SSL_CACERT_BADFILE : CURLE_SSL_CERTPROBLEM; /* libnsspem.so leaks memory if the requested file does not exist. For more * details, go to . */ if(is_file(filename)) - result = nss_create_object(ssl, CKO_CERTIFICATE, filename, cacert); + err = nss_create_object(ssl, CKO_CERTIFICATE, filename, cacert); - if(!result && !cacert) { + if(CURLE_OK == err && !cacert) { /* we have successfully loaded a client certificate */ CERTCertificate *cert; char *nickname = NULL; @@ -442,7 +436,7 @@ static CURLcode nss_load_cert(struct ssl_connect_data *ssl, } } - return result; + return err; } /* add given CRL to cache if it is not already there */ @@ -454,7 +448,7 @@ static CURLcode nss_cache_crl(SECItem *crl_der) /* CRL already cached */ SEC_DestroyCrl(crl); SECITEM_FreeItem(crl_der, PR_TRUE); - return CURLE_OK; + return CURLE_SSL_CRL_BADFILE; } /* acquire lock before call of CERT_CacheCRL() and accessing nss_crl_list */ @@ -548,15 +542,14 @@ static CURLcode nss_load_key(struct connectdata *conn, int sockindex, { PK11SlotInfo *slot; SECStatus status; - CURLcode result; + CURLcode rv; struct ssl_connect_data *ssl = conn->ssl; - (void)sockindex; /* unused */ - result = nss_create_object(ssl, CKO_PRIVATE_KEY, key_file, FALSE); - if(result) { + rv = nss_create_object(ssl, CKO_PRIVATE_KEY, key_file, FALSE); + if(CURLE_OK != rv) { PR_SetError(SEC_ERROR_BAD_KEY, 0); - return result; + return rv; } slot = PK11_FindSlotByName("PEM Token #1"); @@ -570,8 +563,9 @@ static CURLcode nss_load_key(struct connectdata *conn, int sockindex, status = PK11_Authenticate(slot, PR_TRUE, conn->data->set.str[STRING_KEY_PASSWD]); PK11_FreeSlot(slot); - - return (SECSuccess == status) ? CURLE_OK : CURLE_SSL_CERTPROBLEM; + return (SECSuccess == status) + ? CURLE_OK + : CURLE_SSL_CERTPROBLEM; } static int display_error(struct connectdata *conn, PRInt32 err, @@ -594,35 +588,35 @@ static CURLcode cert_stuff(struct connectdata *conn, int sockindex, char *cert_file, char *key_file) { struct SessionHandle *data = conn->data; - CURLcode result; + CURLcode rv; if(cert_file) { - result = nss_load_cert(&conn->ssl[sockindex], cert_file, PR_FALSE); - if(result) { + rv = nss_load_cert(&conn->ssl[sockindex], cert_file, PR_FALSE); + if(CURLE_OK != rv) { const PRErrorCode err = PR_GetError(); if(!display_error(conn, err, cert_file)) { const char *err_name = nss_error_to_name(err); failf(data, "unable to load client cert: %d (%s)", err, err_name); } - return result; + return rv; } } if(key_file || (is_file(cert_file))) { if(key_file) - result = nss_load_key(conn, sockindex, key_file); + rv = nss_load_key(conn, sockindex, key_file); else /* In case the cert file also has the key */ - result = nss_load_key(conn, sockindex, cert_file); - if(result) { + rv = nss_load_key(conn, sockindex, cert_file); + if(CURLE_OK != rv) { const PRErrorCode err = PR_GetError(); if(!display_error(conn, err, key_file)) { const char *err_name = nss_error_to_name(err); failf(data, "unable to load client key: %d (%s)", err, err_name); } - return result; + return rv; } } @@ -632,7 +626,6 @@ static CURLcode cert_stuff(struct connectdata *conn, int sockindex, static char * nss_get_password(PK11SlotInfo * slot, PRBool retry, void *arg) { (void)slot; /* unused */ - if(retry || NULL == arg) return NULL; else @@ -645,34 +638,6 @@ static SECStatus nss_auth_cert_hook(void *arg, PRFileDesc *fd, PRBool checksig, PRBool isServer) { struct connectdata *conn = (struct connectdata *)arg; - -#ifdef SSL_ENABLE_OCSP_STAPLING - if(conn->data->set.ssl.verifystatus) { - SECStatus cacheResult; - - const SECItemArray *csa = SSL_PeerStapledOCSPResponses(fd); - if(!csa) { - failf(conn->data, "Invalid OCSP response"); - return SECFailure; - } - - if(csa->len == 0) { - failf(conn->data, "No OCSP response received"); - return SECFailure; - } - - cacheResult = CERT_CacheOCSPResponseFromSideChannel( - CERT_GetDefaultCertDB(), SSL_PeerCertificate(fd), - PR_Now(), &csa->items[0], arg - ); - - if(cacheResult != SECSuccess) { - failf(conn->data, "Invalid OCSP response"); - return cacheResult; - } - } -#endif - if(!conn->data->set.ssl.verifypeer) { infof(conn->data, "skipping SSL peer certificate verification\n"); return SECSuccess; @@ -693,8 +658,6 @@ static void HandshakeCallback(PRFileDesc *sock, void *arg) unsigned int buflen; SSLNextProtoState state; - struct ssl_connect_data *connssl = &conn->ssl[FIRSTSOCKET]; - if(!conn->data->set.ssl_enable_npn && !conn->data->set.ssl_enable_alpn) { return; } @@ -702,19 +665,18 @@ static void HandshakeCallback(PRFileDesc *sock, void *arg) if(SSL_GetNextProto(sock, &state, buf, &buflen, buflenmax) == SECSuccess) { switch(state) { - case SSL_NEXT_PROTO_NO_SUPPORT: - case SSL_NEXT_PROTO_NO_OVERLAP: - if(connssl->asked_for_h2) + case SSL_NEXT_PROTO_NO_SUPPORT: + case SSL_NEXT_PROTO_NO_OVERLAP: infof(conn->data, "TLS, neither ALPN nor NPN succeeded\n"); - return; + return; #ifdef SSL_ENABLE_ALPN - case SSL_NEXT_PROTO_SELECTED: - infof(conn->data, "ALPN, server accepted to use %.*s\n", buflen, buf); - break; + case SSL_NEXT_PROTO_SELECTED: + infof(conn->data, "ALPN, server accepted to use %.*s\n", buflen, buf); + break; #endif - case SSL_NEXT_PROTO_NEGOTIATED: - infof(conn->data, "NPN, server accepted to use %.*s\n", buflen, buf); - break; + case SSL_NEXT_PROTO_NEGOTIATED: + infof(conn->data, "NPN, server accepted to use %.*s\n", buflen, buf); + break; } if(buflen == NGHTTP2_PROTO_VERSION_ID_LEN && @@ -761,9 +723,8 @@ static void display_cert_info(struct SessionHandle *data, PR_Free(common_name); } -static CURLcode display_conn_info(struct connectdata *conn, PRFileDesc *sock) +static void display_conn_info(struct connectdata *conn, PRFileDesc *sock) { - CURLcode result = CURLE_OK; SSLChannelInfo channel; SSLCipherSuiteInfo suite; CERTCertificate *cert; @@ -782,6 +743,7 @@ static CURLcode display_conn_info(struct connectdata *conn, PRFileDesc *sock) } cert = SSL_PeerCertificate(sock); + if(cert) { infof(conn->data, "Server certificate:\n"); @@ -806,29 +768,21 @@ static CURLcode display_conn_info(struct connectdata *conn, PRFileDesc *sock) cert2 = cert3; } } - - result = Curl_ssl_init_certinfo(conn->data, i); - if(!result) { - for(i = 0; cert; cert = cert2) { - result = Curl_extract_certinfo(conn, i++, (char *)cert->derCert.data, - (char *)cert->derCert.data + - cert->derCert.len); - if(result) - break; - - if(cert->isRoot) { - CERT_DestroyCertificate(cert); - break; - } - - cert2 = CERT_FindCertIssuer(cert, now, certUsageSSLCA); + Curl_ssl_init_certinfo(conn->data, i); + for(i = 0; cert; cert = cert2) { + Curl_extract_certinfo(conn, i++, (char *)cert->derCert.data, + (char *)cert->derCert.data + cert->derCert.len); + if(cert->isRoot) { CERT_DestroyCertificate(cert); + break; } + cert2 = CERT_FindCertIssuer(cert, now, certUsageSSLCA); + CERT_DestroyCertificate(cert); } } } - return result; + return; } static SECStatus BadCertHandler(void *arg, PRFileDesc *sock) @@ -981,6 +935,36 @@ static SECStatus SelectClientCert(void *arg, PRFileDesc *sock, return SECSuccess; } +/* This function is supposed to decide, which error codes should be used + * to conclude server is TLS intolerant. + * + * taken from xulrunner - nsNSSIOLayer.cpp + */ +static PRBool +isTLSIntoleranceError(PRInt32 err) +{ + switch (err) { + case SSL_ERROR_BAD_MAC_ALERT: + case SSL_ERROR_BAD_MAC_READ: + case SSL_ERROR_HANDSHAKE_FAILURE_ALERT: + case SSL_ERROR_HANDSHAKE_UNEXPECTED_ALERT: + case SSL_ERROR_CLIENT_KEY_EXCHANGE_FAILURE: + case SSL_ERROR_ILLEGAL_PARAMETER_ALERT: + case SSL_ERROR_NO_CYPHER_OVERLAP: + case SSL_ERROR_BAD_SERVER: + case SSL_ERROR_BAD_BLOCK_PADDING: + case SSL_ERROR_UNSUPPORTED_VERSION: + case SSL_ERROR_PROTOCOL_VERSION_ALERT: + case SSL_ERROR_RX_MALFORMED_FINISHED: + case SSL_ERROR_BAD_HANDSHAKE_HASH_VALUE: + case SSL_ERROR_DECODE_ERROR_ALERT: + case SSL_ERROR_RX_UNKNOWN_ALERT: + return PR_TRUE; + default: + return PR_FALSE; + } +} + /* update blocking direction in case of PR_WOULD_BLOCK_ERROR */ static void nss_update_connecting_state(ssl_connect_state state, void *secret) { @@ -1046,7 +1030,8 @@ static CURLcode nss_init_core(struct SessionHandle *data, const char *cert_dir) initparams.length = sizeof(initparams); if(cert_dir) { - char *certpath = aprintf("sql:%s", cert_dir); + const bool use_sql = NSS_VersionCheck("3.12.0"); + char *certpath = aprintf("%s%s", use_sql ? "sql:" : "", cert_dir); if(!certpath) return CURLE_OUT_OF_MEMORY; @@ -1076,7 +1061,7 @@ static CURLcode nss_init(struct SessionHandle *data) { char *cert_dir; struct_stat st; - CURLcode result; + CURLcode rv; if(initialized) return CURLE_OK; @@ -1118,15 +1103,14 @@ static CURLcode nss_init(struct SessionHandle *data) nspr_io_methods.close = nspr_io_close; } - result = nss_init_core(data, cert_dir); - if(result) - return result; + rv = nss_init_core(data, cert_dir); + if(rv) + return rv; if(num_enabled_ciphers() == 0) NSS_SetDomesticPolicy(); initialized = 1; - return CURLE_OK; } @@ -1152,18 +1136,18 @@ int Curl_nss_init(void) CURLcode Curl_nss_force_init(struct SessionHandle *data) { - CURLcode result; + CURLcode rv; if(!nss_initlock) { - failf(data, "unable to initialize NSS, curl_global_init() should have " - "been called with CURL_GLOBAL_SSL or CURL_GLOBAL_ALL"); + failf(data, + "unable to initialize NSS, curl_global_init() should have been " + "called with CURL_GLOBAL_SSL or CURL_GLOBAL_ALL"); return CURLE_FAILED_INIT; } PR_Lock(nss_initlock); - result = nss_init(data); + rv = nss_init(data); PR_Unlock(nss_initlock); - - return result; + return rv; } /* Global cleanup */ @@ -1264,9 +1248,10 @@ void Curl_nss_close(struct connectdata *conn, int sockindex) * This function is called when the 'data' struct is going away. Close * down everything and free all resources! */ -void Curl_nss_close_all(struct SessionHandle *data) +int Curl_nss_close_all(struct SessionHandle *data) { (void)data; + return 0; } /* return true if NSS can provide error code (and possibly msg) for the @@ -1311,9 +1296,9 @@ static CURLcode nss_load_ca_certificates(struct connectdata *conn, const char *capath = data->set.ssl.CApath; if(cafile) { - CURLcode result = nss_load_cert(&conn->ssl[sockindex], cafile, PR_TRUE); - if(result) - return result; + CURLcode rv = nss_load_cert(&conn->ssl[sockindex], cafile, PR_TRUE); + if(CURLE_OK != rv) + return rv; } if(capath) { @@ -1358,11 +1343,18 @@ static CURLcode nss_load_ca_certificates(struct connectdata *conn, static CURLcode nss_init_sslver(SSLVersionRange *sslver, struct SessionHandle *data) { - switch(data->set.ssl.version) { + switch (data->set.ssl.version) { default: case CURL_SSLVERSION_DEFAULT: + sslver->min = SSL_LIBRARY_VERSION_3_0; + if(data->state.ssl_connect_retry) { + infof(data, "TLS disabled due to previous handshake failure\n"); + sslver->max = SSL_LIBRARY_VERSION_3_0; + return CURLE_OK; + } + /* intentional fall-through to default to highest TLS version if possible */ + case CURL_SSLVERSION_TLSv1: - sslver->min = SSL_LIBRARY_VERSION_TLS_1_0; #ifdef SSL_LIBRARY_VERSION_TLS_1_2 sslver->max = SSL_LIBRARY_VERSION_TLS_1_2; #elif defined SSL_LIBRARY_VERSION_TLS_1_1 @@ -1412,8 +1404,12 @@ static CURLcode nss_fail_connect(struct ssl_connect_data *connssl, struct SessionHandle *data, CURLcode curlerr) { + SSLVersionRange sslver; PRErrorCode err = 0; + /* reset the flag to avoid an infinite loop */ + data->state.ssl_connect_retry = FALSE; + if(is_nss_error(curlerr)) { /* read NSPR error code */ err = PR_GetError(); @@ -1431,6 +1427,17 @@ static CURLcode nss_fail_connect(struct ssl_connect_data *connssl, Curl_llist_destroy(connssl->obj_list, NULL); connssl->obj_list = NULL; + if(connssl->handle + && (SSL_VersionRangeGet(connssl->handle, &sslver) == SECSuccess) + && (sslver.min == SSL_LIBRARY_VERSION_3_0) + && (sslver.max != SSL_LIBRARY_VERSION_3_0) + && isTLSIntoleranceError(err)) { + /* schedule reconnect through Curl_retry_request() */ + data->state.ssl_connect_retry = TRUE; + infof(data, "Error in TLS handshake, trying SSLv3...\n"); + return CURLE_OK; + } + return curlerr; } @@ -1458,7 +1465,7 @@ static CURLcode nss_setup_connect(struct connectdata *conn, int sockindex) struct SessionHandle *data = conn->data; curl_socket_t sockfd = conn->sock[sockindex]; struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - CURLcode result; + CURLcode curlerr; SSLVersionRange sslver = { SSL_LIBRARY_VERSION_TLS_1_0, /* min */ @@ -1475,6 +1482,10 @@ static CURLcode nss_setup_connect(struct connectdata *conn, int sockindex) #endif #endif + + if(connssl->state == ssl_connection_complete) + return CURLE_OK; + connssl->data = data; /* list of all NSS objects we need to destroy in Curl_nss_close() */ @@ -1484,13 +1495,13 @@ static CURLcode nss_setup_connect(struct connectdata *conn, int sockindex) /* FIXME. NSS doesn't support multiple databases open at the same time. */ PR_Lock(nss_initlock); - result = nss_init(conn->data); - if(result) { + curlerr = nss_init(conn->data); + if(CURLE_OK != curlerr) { PR_Unlock(nss_initlock); goto error; } - result = CURLE_SSL_CONNECT_ERROR; + curlerr = CURLE_SSL_CONNECT_ERROR; if(!mod) { char *configstring = aprintf("library=%s name=PEM", pem_library); @@ -1507,7 +1518,7 @@ static CURLcode nss_setup_connect(struct connectdata *conn, int sockindex) mod = NULL; } infof(data, "WARNING: failed to load NSS PEM library %s. Using " - "OpenSSL PEM certificates will not work.\n", pem_library); + "OpenSSL PEM certificates will not work.\n", pem_library); } } @@ -1550,9 +1561,12 @@ static CURLcode nss_setup_connect(struct connectdata *conn, int sockindex) infof(data, "warning: support for SSL_CBC_RANDOM_IV not compiled in\n"); #endif + /* reset the flag to avoid an infinite loop */ + data->state.ssl_connect_retry = FALSE; + if(data->set.ssl.cipher_list) { if(set_ciphers(data, model, data->set.ssl.cipher_list) != SECSuccess) { - result = CURLE_SSL_CIPHER; + curlerr = CURLE_SSL_CIPHER; goto error; } } @@ -1574,16 +1588,16 @@ static CURLcode nss_setup_connect(struct connectdata *conn, int sockindex) if(data->set.ssl.verifypeer) { const CURLcode rv = nss_load_ca_certificates(conn, sockindex); - if(rv) { - result = rv; + if(CURLE_OK != rv) { + curlerr = rv; goto error; } } if(data->set.ssl.CRLfile) { const CURLcode rv = nss_load_crl(data->set.ssl.CRLfile); - if(rv) { - result = rv; + if(CURLE_OK != rv) { + curlerr = rv; goto error; } infof(data, " CRLfile: %s\n", data->set.ssl.CRLfile); @@ -1598,9 +1612,9 @@ static CURLcode nss_setup_connect(struct connectdata *conn, int sockindex) else { CURLcode rv = cert_stuff(conn, sockindex, data->set.str[STRING_CERT], data->set.str[STRING_KEY]); - if(rv) { + if(CURLE_OK != rv) { /* failf() is already done in cert_stuff() */ - result = rv; + curlerr = rv; goto error; } } @@ -1613,7 +1627,7 @@ static CURLcode nss_setup_connect(struct connectdata *conn, int sockindex) if(SSL_GetClientAuthDataHook(model, SelectClientCert, (void *)connssl) != SECSuccess) { - result = CURLE_SSL_CERTPROBLEM; + curlerr = CURLE_SSL_CERTPROBLEM; goto error; } @@ -1654,14 +1668,6 @@ static CURLcode nss_setup_connect(struct connectdata *conn, int sockindex) SSL_SetPKCS11PinArg(connssl->handle, data->set.str[STRING_KEY_PASSWD]); } -#ifdef SSL_ENABLE_OCSP_STAPLING - if(data->set.ssl.verifystatus) { - if(SSL_OptionSet(connssl->handle, SSL_ENABLE_OCSP_STAPLING, PR_TRUE) - != SECSuccess) - goto error; - } -#endif - #ifdef USE_NGHTTP2 if(data->set.httpversion == CURL_HTTP_VERSION_2_0) { #ifdef SSL_ENABLE_NPN @@ -1693,7 +1699,6 @@ static CURLcode nss_setup_connect(struct connectdata *conn, int sockindex) if(SSL_SetNextProtoNego(connssl->handle, alpn_protos, alpn_protos_len) != SECSuccess) goto error; - connssl->asked_for_h2 = TRUE; } else { infof(data, "SSL, can't negotiate HTTP/2.0 with neither NPN nor ALPN\n"); @@ -1714,21 +1719,21 @@ error: if(model) PR_Close(model); - return nss_fail_connect(connssl, data, result); + return nss_fail_connect(connssl, data, curlerr); } static CURLcode nss_do_connect(struct connectdata *conn, int sockindex) { struct ssl_connect_data *connssl = &conn->ssl[sockindex]; struct SessionHandle *data = conn->data; - CURLcode result = CURLE_SSL_CONNECT_ERROR; + CURLcode curlerr = CURLE_SSL_CONNECT_ERROR; PRUint32 timeout; /* check timeout situation */ const long time_left = Curl_timeleft(data, NULL, TRUE); if(time_left < 0L) { failf(data, "timed out before SSL handshake"); - result = CURLE_OPERATION_TIMEDOUT; + curlerr = CURLE_OPERATION_TIMEDOUT; goto error; } @@ -1739,15 +1744,17 @@ static CURLcode nss_do_connect(struct connectdata *conn, int sockindex) /* blocking direction is updated by nss_update_connecting_state() */ return CURLE_AGAIN; else if(conn->data->set.ssl.certverifyresult == SSL_ERROR_BAD_CERT_DOMAIN) - result = CURLE_PEER_FAILED_VERIFICATION; + curlerr = CURLE_PEER_FAILED_VERIFICATION; else if(conn->data->set.ssl.certverifyresult!=0) - result = CURLE_SSL_CACERT; + curlerr = CURLE_SSL_CACERT; goto error; } - result = display_conn_info(conn, connssl->handle); - if(result) - goto error; + connssl->state = ssl_connection_complete; + conn->recv[sockindex] = nss_recv; + conn->send[sockindex] = nss_send; + + display_conn_info(conn, connssl->handle); if(data->set.str[STRING_SSL_ISSUERCERT]) { SECStatus ret = SECFailure; @@ -1760,7 +1767,7 @@ static CURLcode nss_do_connect(struct connectdata *conn, int sockindex) if(SECFailure == ret) { infof(data,"SSL certificate issuer check failed\n"); - result = CURLE_SSL_ISSUER_ERROR; + curlerr = CURLE_SSL_ISSUER_ERROR; goto error; } else { @@ -1771,7 +1778,7 @@ static CURLcode nss_do_connect(struct connectdata *conn, int sockindex) return CURLE_OK; error: - return nss_fail_connect(connssl, data, result); + return nss_fail_connect(connssl, data, curlerr); } static CURLcode nss_connect_common(struct connectdata *conn, int sockindex, @@ -1780,29 +1787,26 @@ static CURLcode nss_connect_common(struct connectdata *conn, int sockindex, struct ssl_connect_data *connssl = &conn->ssl[sockindex]; struct SessionHandle *data = conn->data; const bool blocking = (done == NULL); - CURLcode result; - - if(connssl->state == ssl_connection_complete) - return CURLE_OK; + CURLcode rv; if(connssl->connecting_state == ssl_connect_1) { - result = nss_setup_connect(conn, sockindex); - if(result) + rv = nss_setup_connect(conn, sockindex); + if(rv) /* we do not expect CURLE_AGAIN from nss_setup_connect() */ - return result; + return rv; if(!blocking) { /* in non-blocking mode, set NSS non-blocking mode before handshake */ - result = nss_set_nonblock(connssl, data); - if(result) - return result; + rv = nss_set_nonblock(connssl, data); + if(rv) + return rv; } connssl->connecting_state = ssl_connect_2; } - result = nss_do_connect(conn, sockindex); - switch(result) { + rv = nss_do_connect(conn, sockindex); + switch(rv) { case CURLE_OK: break; case CURLE_AGAIN: @@ -1811,26 +1815,20 @@ static CURLcode nss_connect_common(struct connectdata *conn, int sockindex, return CURLE_OK; /* fall through */ default: - return result; + return rv; } if(blocking) { /* in blocking mode, set NSS non-blocking mode _after_ SSL handshake */ - result = nss_set_nonblock(connssl, data); - if(result) - return result; + rv = nss_set_nonblock(connssl, data); + if(rv) + return rv; } else /* signal completed SSL handshake */ *done = TRUE; - connssl->state = ssl_connection_complete; - conn->recv[sockindex] = nss_recv; - conn->send[sockindex] = nss_send; - - /* ssl_connect_done is never used outside, go back to the initial state */ - connssl->connecting_state = ssl_connect_1; - + connssl->connecting_state = ssl_connect_done; return CURLE_OK; } @@ -1869,10 +1867,8 @@ static ssize_t nss_send(struct connectdata *conn, /* connection data */ ? CURLE_SSL_CERTPROBLEM : CURLE_SEND_ERROR; } - return -1; } - return rc; /* number of bytes */ } @@ -1902,10 +1898,8 @@ static ssize_t nss_recv(struct connectdata * conn, /* connection data */ ? CURLE_SSL_CERTPROBLEM : CURLE_RECV_ERROR; } - return -1; } - return nread; } @@ -1920,21 +1914,16 @@ int Curl_nss_seed(struct SessionHandle *data) return !!Curl_nss_force_init(data); } -/* data might be NULL */ -int Curl_nss_random(struct SessionHandle *data, - unsigned char *entropy, - size_t length) +void Curl_nss_random(struct SessionHandle *data, + unsigned char *entropy, + size_t length) { - if(data) - Curl_nss_seed(data); /* Initiate the seed if not already done */ - + Curl_nss_seed(data); /* Initiate the seed if not already done */ if(SECSuccess != PK11_GenerateRandom(entropy, curlx_uztosi(length))) { /* no way to signal a failure from here, we have to abort */ failf(data, "PK11_GenerateRandom() failed, calling abort()..."); abort(); } - - return 0; } void Curl_nss_md5sum(unsigned char *tmp, /* input */ @@ -1944,19 +1933,9 @@ void Curl_nss_md5sum(unsigned char *tmp, /* input */ { PK11Context *MD5pw = PK11_CreateDigestContext(SEC_OID_MD5); unsigned int MD5out; - PK11_DigestOp(MD5pw, tmp, curlx_uztoui(tmplen)); PK11_DigestFinal(MD5pw, md5sum, &MD5out, curlx_uztoui(md5len)); PK11_DestroyContext(MD5pw, PR_TRUE); } -bool Curl_nss_cert_status_request(void) -{ -#ifdef SSL_ENABLE_OCSP_STAPLING - return TRUE; -#else - return FALSE; -#endif -} - #endif /* USE_NSS */ diff --git a/lib/vtls/nssg.h b/lib/vtls/nssg.h index 3187106..21e96ce 100644 --- a/lib/vtls/nssg.h +++ b/lib/vtls/nssg.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -39,7 +39,7 @@ void Curl_nss_close(struct connectdata *conn, int sockindex); /* tell NSS to close down all open information regarding connections (and thus session ID caching etc) */ -void Curl_nss_close_all(struct SessionHandle *data); +int Curl_nss_close_all(struct SessionHandle *data); int Curl_nss_init(void); void Curl_nss_cleanup(void); @@ -51,22 +51,18 @@ int Curl_nss_seed(struct SessionHandle *data); /* initialize NSS library if not already */ CURLcode Curl_nss_force_init(struct SessionHandle *data); -int Curl_nss_random(struct SessionHandle *data, - unsigned char *entropy, - size_t length); +void Curl_nss_random(struct SessionHandle *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); -bool Curl_nss_cert_status_request(void); - -/* this backend supports the CAPATH option */ -#define have_curlssl_ca_path 1 - -/* this backend supports CURLOPT_CERTINFO */ -#define have_curlssl_certinfo 1 +/* this backend provides these functions: */ +#define have_curlssl_random 1 +#define have_curlssl_md5sum 1 /* API setup for NSS */ #define curlssl_init Curl_nss_init @@ -79,17 +75,15 @@ bool Curl_nss_cert_status_request(void); #define curlssl_close_all Curl_nss_close_all #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_shutdown(x,y) (x=x, y=y, 1) +#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_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_data_pending(x,y) (x=x, y=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_cert_status_request() Curl_nss_cert_status_request() -#define CURL_SSL_BACKEND CURLSSLBACKEND_NSS #endif /* USE_NSS */ #endif /* HEADER_CURL_NSSG_H */ diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index a68d88e..c489600 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -63,7 +63,6 @@ #include #include #include -#include #else #include #include @@ -131,8 +130,7 @@ #define HAVE_ERR_REMOVE_THREAD_STATE 1 #endif -#if !defined(HAVE_SSLV2_CLIENT_METHOD) || \ - OPENSSL_VERSION_NUMBER >= 0x10100000L /* 1.1.0+ has no SSLv2 */ +#ifndef HAVE_SSLV2_CLIENT_METHOD #undef OPENSSL_NO_SSL2 /* undef first to avoid compiler warnings */ #define OPENSSL_NO_SSL2 #endif @@ -261,7 +259,7 @@ static int ossl_seed(struct SessionHandle *data) return nread; } -static int Curl_ossl_seed(struct SessionHandle *data) +int Curl_ossl_seed(struct SessionHandle *data) { /* we have the "SSL is seeded" boolean static to prevent multiple time-consuming seedings in vain */ @@ -310,7 +308,8 @@ static int ssl_ui_reader(UI *ui, UI_STRING *uis) case UIT_PROMPT: case UIT_VERIFY: password = (const char*)UI_get0_user_data(ui); - if(password && (UI_get_input_flags(uis) & UI_INPUT_FLAG_DEFAULT_PWD)) { + if(NULL != password && + UI_get_input_flags(uis) & UI_INPUT_FLAG_DEFAULT_PWD) { UI_set_result(ui, uis, password); return 1; } @@ -328,8 +327,8 @@ static int ssl_ui_writer(UI *ui, UI_STRING *uis) switch(UI_get_string_type(uis)) { case UIT_PROMPT: case UIT_VERIFY: - if(UI_get0_user_data(ui) && - (UI_get_input_flags(uis) & UI_INPUT_FLAG_DEFAULT_PWD)) { + if(NULL != UI_get0_user_data(ui) && + UI_get_input_flags(uis) & UI_INPUT_FLAG_DEFAULT_PWD) { return 1; } default: @@ -351,7 +350,7 @@ int cert_stuff(struct connectdata *conn, int file_type = do_file_type(cert_type); - if(cert_file || (file_type == SSL_FILETYPE_ENGINE)) { + if(cert_file != NULL || file_type == SSL_FILETYPE_ENGINE) { SSL *ssl; X509 *x509; int cert_done = 0; @@ -557,7 +556,7 @@ int cert_stuff(struct connectdata *conn, case SSL_FILETYPE_PEM: if(cert_done) break; - if(!key_file) + if(key_file == NULL) /* cert & key can only be in PEM case in the same file */ key_file=cert_file; case SSL_FILETYPE_ASN1: @@ -575,7 +574,7 @@ int cert_stuff(struct connectdata *conn, #ifdef HAVE_ENGINE_LOAD_FOUR_ARGS UI_METHOD *ui_method = UI_create_method((char *)"cURL user interface"); - if(!ui_method) { + if(NULL == ui_method) { failf(data, "unable do create OpenSSL user-interface method"); return 0; } @@ -627,7 +626,7 @@ int cert_stuff(struct connectdata *conn, } ssl=SSL_new(ctx); - if(!ssl) { + if(NULL == ssl) { failf(data,"unable to create an SSL structure"); return 0; } @@ -636,7 +635,7 @@ int cert_stuff(struct connectdata *conn, /* This version was provided by Evan Jordan and is supposed to not leak memory as the previous version: */ - if(x509) { + if(x509 != NULL) { EVP_PKEY *pktmp = X509_get_pubkey(x509); EVP_PKEY_copy_parameters(pktmp,SSL_get_privatekey(ssl)); EVP_PKEY_free(pktmp); @@ -742,23 +741,7 @@ int Curl_ossl_init(void) return 0; OpenSSL_add_all_algorithms(); - - - /* OPENSSL_config(NULL); is "strongly recommended" to use but unfortunately - that function makes an exit() call on wrongly formatted config files - which makes it hard to use in some situations. OPENSSL_config() itself - calls CONF_modules_load_file() and we use that instead and we ignore - its return code! */ - - /* CONF_MFLAGS_DEFAULT_SECTION introduced some time between 0.9.8b and - 0.9.8e */ -#ifndef CONF_MFLAGS_DEFAULT_SECTION -#define CONF_MFLAGS_DEFAULT_SECTION 0x0 -#endif - - (void)CONF_modules_load_file(NULL, NULL, - CONF_MFLAGS_DEFAULT_SECTION| - CONF_MFLAGS_IGNORE_MISSING_FILE); + OPENSSL_config(NULL); return 1; } @@ -1038,7 +1021,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 SessionHandle *data) +int Curl_ossl_close_all(struct SessionHandle *data) { #ifdef HAVE_OPENSSL_ENGINE_H if(data->state.engine) { @@ -1049,6 +1032,7 @@ void Curl_ossl_close_all(struct SessionHandle *data) #else (void)data; #endif + return 0; } static int asn1_output(const ASN1_UTCTIME *tm, @@ -1118,7 +1102,8 @@ static int asn1_output(const ASN1_UTCTIME *tm, in the certificate and must exactly match the IP in the URI. */ -static CURLcode verifyhost(struct connectdata *conn, X509 *server_cert) +static CURLcode verifyhost(struct connectdata *conn, + X509 *server_cert) { int matched = -1; /* -1 is no alternative match yet, 1 means match and 0 means mismatch */ @@ -1131,7 +1116,7 @@ static CURLcode verifyhost(struct connectdata *conn, X509 *server_cert) #else struct in_addr addr; #endif - CURLcode result = CURLE_OK; + CURLcode res = CURLE_OK; #ifdef ENABLE_IPV6 if(conn->bits.ipv6_ip && @@ -1212,7 +1197,7 @@ static CURLcode verifyhost(struct connectdata *conn, X509 *server_cert) infof(data, "\t subjectAltName does not match %s\n", conn->host.dispname); failf(data, "SSL: no alternative certificate subject name matches " "target host name '%s'", conn->host.dispname); - result = CURLE_PEER_FAILED_VERIFICATION; + res = CURLE_PEER_FAILED_VERIFICATION; } else { /* we have to look to the last occurrence of a commonName in the @@ -1259,7 +1244,7 @@ static CURLcode verifyhost(struct connectdata *conn, X509 *server_cert) /* there was a terminating zero before the end of string, this cannot match and we return failure! */ failf(data, "SSL: illegal cert name field"); - result = CURLE_PEER_FAILED_VERIFICATION; + res = CURLE_PEER_FAILED_VERIFICATION; } } } @@ -1276,18 +1261,18 @@ static CURLcode verifyhost(struct connectdata *conn, X509 *server_cert) } } - if(result) + if(res) /* error already detected, pass through */ ; else if(!peer_CN) { failf(data, "SSL: unable to obtain common name from peer certificate"); - result = CURLE_PEER_FAILED_VERIFICATION; + res = CURLE_PEER_FAILED_VERIFICATION; } else if(!Curl_cert_hostcheck((const char *)peer_CN, conn->host.name)) { failf(data, "SSL: certificate subject name '%s' does not match " "target host name '%s'", peer_CN, conn->host.dispname); - result = CURLE_PEER_FAILED_VERIFICATION; + res = CURLE_PEER_FAILED_VERIFICATION; } else { infof(data, "\t common name: %s (matched)\n", peer_CN); @@ -1295,8 +1280,7 @@ static CURLcode verifyhost(struct connectdata *conn, X509 *server_cert) if(peer_CN) OPENSSL_free(peer_CN); } - - return result; + return res; } #endif /* USE_SSLEAY */ @@ -1306,7 +1290,6 @@ static CURLcode verifyhost(struct connectdata *conn, X509 *server_cert) static const char *ssl_msg_type(int ssl_ver, int msg) { -#ifdef SSL2_VERSION_MAJOR if(ssl_ver == SSL2_VERSION_MAJOR) { switch (msg) { case SSL2_MT_ERROR: @@ -1329,9 +1312,7 @@ static const char *ssl_msg_type(int ssl_ver, int msg) return "Client CERT"; } } - else -#endif - if(ssl_ver == SSL3_VERSION_MAJOR) { + else if(ssl_ver == SSL3_VERSION_MAJOR) { switch (msg) { case SSL3_MT_HELLO_REQUEST: return "Hello request"; @@ -1379,47 +1360,16 @@ static void ssl_tls_trace(int direction, int ssl_ver, int content_type, struct SessionHandle *data; const char *msg_name, *tls_rt_name; char ssl_buf[1024]; - char unknown[32]; - int msg_type, txt_len; - const char *verstr; + int ver, msg_type, txt_len; if(!conn || !conn->data || !conn->data->set.fdebug || (direction != 0 && direction != 1)) return; data = conn->data; - - switch(ssl_ver) { -#ifdef SSL2_VERSION_MAJOR /* removed in recent versions */ - case SSL2_VERSION_MAJOR: - verstr = "SSLv2"; - break; -#endif -#ifdef SSL3_VERSION - case SSL3_VERSION: - verstr = "SSLv3"; - break; -#endif - case TLS1_VERSION: - verstr = "TLSv1.0"; - break; -#ifdef TLS1_1_VERSION - case TLS1_1_VERSION: - verstr = "TLSv1.1"; - break; -#endif -#ifdef TLS1_2_VERSION - case TLS1_2_VERSION: - verstr = "TLSv1.2"; - break; -#endif - default: - snprintf(unknown, sizeof(unknown), "(%x)", ssl_ver); - verstr = unknown; - break; - } - - ssl_ver >>= 8; /* check the upper 8 bits only below */ + ssl_ver >>= 8; + ver = (ssl_ver == SSL2_VERSION_MAJOR ? '2' : + ssl_ver == SSL3_VERSION_MAJOR ? '3' : '?'); /* SSLv2 doesn't seem to have TLS record-type headers, so OpenSSL * always pass-up content-type as 0. But the interesting message-type @@ -1433,8 +1383,8 @@ static void ssl_tls_trace(int direction, int ssl_ver, int content_type, msg_type = *(char*)buf; msg_name = ssl_msg_type(ssl_ver, msg_type); - txt_len = snprintf(ssl_buf, sizeof(ssl_buf), "%s, %s%s (%d):\n", - verstr, tls_rt_name, msg_name, msg_type); + txt_len = snprintf(ssl_buf, sizeof(ssl_buf), "SSLv%c, %s%s (%d):\n", + ver, tls_rt_name, msg_name, msg_type); Curl_debug(data, CURLINFO_TEXT, ssl_buf, (size_t)txt_len, NULL); Curl_debug(data, (direction == 1) ? CURLINFO_SSL_DATA_OUT : @@ -1454,22 +1404,19 @@ static void ssl_tls_trace(int direction, int ssl_ver, int content_type, #ifdef USE_NGHTTP2 -/* Check for OpenSSL 1.0.2 which has ALPN support. */ #undef HAS_ALPN -#if OPENSSL_VERSION_NUMBER >= 0x10002000L \ - && !defined(OPENSSL_NO_TLSEXT) +#if defined(HAVE_SSL_CTX_SET_ALPN_PROTOS) && \ + defined(HAVE_SSL_CTX_SET_ALPN_SELECT_CB) # define HAS_ALPN 1 #endif -/* Check for OpenSSL 1.0.1 which has NPN support. */ -#undef HAS_NPN -#if OPENSSL_VERSION_NUMBER >= 0x10001000L \ - && !defined(OPENSSL_NO_TLSEXT) \ - && !defined(OPENSSL_NO_NEXTPROTONEG) -# define HAS_NPN 1 +#if !defined(HAVE_SSL_CTX_SET_NEXT_PROTO_SELECT_CB) || \ + defined(OPENSSL_NO_NEXTPROTONEG) +# if !defined(HAS_ALPN) +# error http2 builds require OpenSSL with NPN or ALPN support +# endif #endif -#ifdef HAS_NPN /* * in is a list of lenght prefixed strings. this function has to select @@ -1483,7 +1430,6 @@ select_next_proto_cb(SSL *ssl, { struct connectdata *conn = (struct connectdata*) arg; int retval = nghttp2_select_next_protocol(out, outlen, in, inlen); - (void)ssl; if(retval == 1) { @@ -1505,14 +1451,12 @@ select_next_proto_cb(SSL *ssl, return SSL_TLSEXT_ERR_OK; } -#endif /* HAS_NPN */ - -#endif /* USE_NGHTTP2 */ +#endif static const char * get_ssl_version_txt(SSL_SESSION *session) { - if(!session) + if(NULL == session) return ""; switch(session->ssl_version) { @@ -1532,14 +1476,17 @@ get_ssl_version_txt(SSL_SESSION *session) return "unknown"; } -static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex) + +static CURLcode +ossl_connect_step1(struct connectdata *conn, + int sockindex) { - CURLcode result = CURLE_OK; + CURLcode retcode = CURLE_OK; char *ciphers; struct SessionHandle *data = conn->data; - SSL_METHOD_QUAL SSL_METHOD *req_method = NULL; - void *ssl_sessionid = NULL; - X509_LOOKUP *lookup = NULL; + SSL_METHOD_QUAL SSL_METHOD *req_method=NULL; + void *ssl_sessionid=NULL; + X509_LOOKUP *lookup=NULL; curl_socket_t sockfd = conn->sock[sockindex]; struct ssl_connect_data *connssl = &conn->ssl[sockindex]; long ctx_options; @@ -1686,12 +1633,17 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex) #endif switch(data->set.ssl.version) { - case CURL_SSLVERSION_SSLv3: + case CURL_SSLVERSION_DEFAULT: + ctx_options |= SSL_OP_NO_SSLv2; #ifdef USE_TLS_SRP if(data->set.ssl.authtype == CURL_TLSAUTH_SRP) { infof(data, "Set version TLSv1.x for SRP authorisation\n"); + ctx_options |= SSL_OP_NO_SSLv3; } #endif + break; + + case CURL_SSLVERSION_SSLv3: ctx_options |= SSL_OP_NO_SSLv2; ctx_options |= SSL_OP_NO_TLSv1; #if OPENSSL_VERSION_NUMBER >= 0x1000100FL @@ -1700,7 +1652,6 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex) #endif break; - case CURL_SSLVERSION_DEFAULT: case CURL_SSLVERSION_TLSv1: ctx_options |= SSL_OP_NO_SSLv2; ctx_options |= SSL_OP_NO_SSLv3; @@ -1751,12 +1702,10 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex) #ifdef USE_NGHTTP2 if(data->set.httpversion == CURL_HTTP_VERSION_2_0) { -#ifdef HAS_NPN if(data->set.ssl_enable_npn) { SSL_CTX_set_next_proto_select_cb(connssl->ctx, select_next_proto_cb, - conn); + conn); } -#endif #ifdef HAS_ALPN if(data->set.ssl_enable_alpn) { @@ -1776,7 +1725,6 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex) infof(data, "ALPN, offering %s, %s\n", NGHTTP2_PROTO_VERSION_ID, ALPN_HTTP_1_1); - connssl->asked_for_h2 = TRUE; } #endif } @@ -1893,11 +1841,11 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex) /* give application a chance to interfere with SSL set up. */ if(data->set.ssl.fsslctx) { - result = (*data->set.ssl.fsslctx)(data, connssl->ctx, - data->set.ssl.fsslctxp); - if(result) { + retcode = (*data->set.ssl.fsslctx)(data, connssl->ctx, + data->set.ssl.fsslctxp); + if(retcode) { failf(data,"error signaled by ssl ctx callback"); - return result; + return retcode; } } @@ -1944,11 +1892,11 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex) } connssl->connecting_state = ssl_connect_2; - return CURLE_OK; } -static CURLcode ossl_connect_step2(struct connectdata *conn, int sockindex) +static CURLcode +ossl_connect_step2(struct connectdata *conn, int sockindex) { struct SessionHandle *data = conn->data; int err; @@ -1980,7 +1928,7 @@ static CURLcode ossl_connect_step2(struct connectdata *conn, int sockindex) unsigned long errdetail; char error_buffer[256]; /* OpenSSL documents that this must be at least 256 bytes long. */ - CURLcode result; + CURLcode rc; const char *cert_problem = NULL; long lerr; @@ -2004,7 +1952,7 @@ static CURLcode ossl_connect_step2(struct connectdata *conn, int sockindex) SSL routines: SSL3_GET_SERVER_CERTIFICATE: certificate verify failed */ - result = CURLE_SSL_CACERT; + rc = CURLE_SSL_CACERT; lerr = SSL_get_verify_result(connssl->handle); if(lerr != X509_V_OK) { @@ -2018,7 +1966,7 @@ static CURLcode ossl_connect_step2(struct connectdata *conn, int sockindex) break; default: - result = CURLE_SSL_CONNECT_ERROR; + rc = CURLE_SSL_CONNECT_ERROR; SSL_strerror(errdetail, error_buffer, sizeof(error_buffer)); break; } @@ -2029,16 +1977,15 @@ static CURLcode ossl_connect_step2(struct connectdata *conn, int sockindex) * (RST connection etc.), OpenSSL gives no explanation whatsoever and * the SO_ERROR is also lost. */ - if(CURLE_SSL_CONNECT_ERROR == result && errdetail == 0) { + if(CURLE_SSL_CONNECT_ERROR == rc && errdetail == 0) { failf(data, "Unknown SSL protocol error in connection to %s:%ld ", conn->host.name, conn->remote_port); - return result; + return rc; } - /* Could be a CERT problem */ - failf(data, "%s%s", cert_problem ? cert_problem : "", error_buffer); - return result; + failf(data, "%s%s", cert_problem ? cert_problem : "", error_buffer); + return rc; } } else { @@ -2046,9 +1993,9 @@ static CURLcode ossl_connect_step2(struct connectdata *conn, int sockindex) connssl->connecting_state = ssl_connect_3; /* Informational message */ - infof(data, "SSL connection using %s / %s\n", - get_ssl_version_txt(SSL_get_session(connssl->handle)), - SSL_get_cipher(connssl->handle)); + infof (data, "SSL connection using %s / %s\n", + get_ssl_version_txt(SSL_get_session(connssl->handle)), + SSL_get_cipher(connssl->handle)); #ifdef HAS_ALPN /* Sets data and len to negotiated protocol, len is 0 if no protocol was @@ -2063,17 +2010,16 @@ static CURLcode ossl_connect_step2(struct connectdata *conn, int sockindex) if(len == NGHTTP2_PROTO_VERSION_ID_LEN && memcmp(NGHTTP2_PROTO_VERSION_ID, neg_protocol, len) == 0) { - conn->negnpn = NPN_HTTP2; + conn->negnpn = NPN_HTTP2; } - else if(len == - ALPN_HTTP_1_1_LENGTH && memcmp(ALPN_HTTP_1_1, - neg_protocol, - ALPN_HTTP_1_1_LENGTH) == 0) { + else if(len == ALPN_HTTP_1_1_LENGTH && memcmp(ALPN_HTTP_1_1, + neg_protocol, ALPN_HTTP_1_1_LENGTH) == 0) { conn->negnpn = NPN_HTTP1_1; } } - else if(connssl->asked_for_h2) + else { infof(data, "ALPN, server did not agree to a protocol\n"); + } } #endif @@ -2126,7 +2072,7 @@ static void pubkey_show(struct SessionHandle *data, #define print_pubkey_BN(_type, _name, _num) \ do { \ - if(pubkey->pkey._type->_name) { \ + if(pubkey->pkey._type->_name != NULL) { \ int len = BN_num_bytes(pubkey->pkey._type->_name); \ if(len < CERTBUFFERSIZE) { \ BN_bn2bin(pubkey->pkey._type->_name, (unsigned char*)bufp); \ @@ -2204,7 +2150,6 @@ static void X509_signature(struct SessionHandle *data, char buf[1024]; char *ptr = buf; int i; - for(i=0; ilength; i++) ptr+=snprintf(ptr, sizeof(buf)-(ptr-buf), "%02x:", sig->data[i]); @@ -2227,6 +2172,7 @@ static void dumpcert(struct SessionHandle *data, X509 *x, int numcert) "Cert", biomem->data, biomem->length); BIO_free(bio_out); + } /* @@ -2240,7 +2186,6 @@ static CURLcode get_cert_chain(struct connectdata *conn, struct ssl_connect_data *connssl) { - CURLcode result; STACK_OF(X509) *sk; int i; char *bufp; @@ -2258,11 +2203,9 @@ static CURLcode get_cert_chain(struct connectdata *conn, } numcerts = sk_X509_num(sk); - - result = Curl_ssl_init_certinfo(data, numcerts); - if(result) { + if(Curl_ssl_init_certinfo(data, numcerts)) { free(bufp); - return result; + return CURLE_OUT_OF_MEMORY; } infof(data, "--- Certificate chain\n"); @@ -2404,65 +2347,6 @@ static CURLcode get_cert_chain(struct connectdata *conn, } /* - * Heavily modified from: - * https://www.owasp.org/index.php/Certificate_and_Public_Key_Pinning#OpenSSL - */ -static CURLcode pkp_pin_peer_pubkey(X509* cert, const char *pinnedpubkey) -{ - /* Scratch */ - int len1 = 0, len2 = 0; - unsigned char *buff1 = NULL, *temp = 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(!cert) - return result; - - do { - /* Begin Gyrations to get the subjectPublicKeyInfo */ - /* Thanks to Viktor Dukhovni on the OpenSSL mailing list */ - - /* http://groups.google.com/group/mailing.openssl.users/browse_thread - /thread/d61858dae102c6c7 */ - len1 = i2d_X509_PUBKEY(X509_get_X509_PUBKEY(cert), NULL); - if(len1 < 1) - break; /* failed */ - - /* http://www.openssl.org/docs/crypto/buffer.html */ - buff1 = temp = OPENSSL_malloc(len1); - if(!buff1) - break; /* failed */ - - /* http://www.openssl.org/docs/crypto/d2i_X509.html */ - len2 = i2d_X509_PUBKEY(X509_get_X509_PUBKEY(cert), &temp); - - /* - * These checks are verifying we got back the same values as when we - * sized the buffer.Its pretty weak since they should always be the - * same. But it gives us something to test. - */ - if((len1 != len2) || !temp || ((temp - buff1) != len1)) - break; /* failed */ - - /* End Gyrations */ - - /* The one good exit point */ - result = Curl_pin_peer_pubkey(pinnedpubkey, buff1, len1); - } while(0); - - /* http://www.openssl.org/docs/crypto/buffer.html */ - if(buff1) - OPENSSL_free(buff1); - - return result; -} - -/* * Get the server cert, verify it and show it etc, only call failf() if the * 'strict' argument is TRUE as otherwise all this is for informational * purposes only! @@ -2474,7 +2358,7 @@ static CURLcode servercert(struct connectdata *conn, struct ssl_connect_data *connssl, bool strict) { - CURLcode result = CURLE_OK; + CURLcode retcode = CURLE_OK; int rc; long lerr; ASN1_TIME *certdate; @@ -2482,7 +2366,6 @@ static CURLcode servercert(struct connectdata *conn, X509 *issuer; FILE *fp; char *buffer = data->state.buffer; - const char *ptr; if(data->set.ssl.certinfo) /* we've been asked to gather certificate info! */ @@ -2494,8 +2377,7 @@ static CURLcode servercert(struct connectdata *conn, failf(data, "SSL: couldn't get peer certificate!"); return CURLE_PEER_FAILED_VERIFICATION; } - - infof(data, "Server certificate:\n"); + infof (data, "Server certificate:\n"); rc = x509_name_oneline(X509_get_subject_name(connssl->server_cert), buffer, BUFSIZE); @@ -2510,11 +2392,11 @@ static CURLcode servercert(struct connectdata *conn, infof(data, "\t expire date: %s\n", buffer); if(data->set.ssl.verifyhost) { - result = verifyhost(conn, connssl->server_cert); - if(result) { + retcode = verifyhost(conn, connssl->server_cert); + if(retcode) { X509_free(connssl->server_cert); connssl->server_cert = NULL; - return result; + return retcode; } } @@ -2523,7 +2405,7 @@ static CURLcode servercert(struct connectdata *conn, if(rc) { if(strict) failf(data, "SSL: couldn't get X509-issuer name!"); - result = CURLE_SSL_CONNECT_ERROR; + retcode = CURLE_SSL_CONNECT_ERROR; } else { infof(data, "\t issuer: %s\n", buffer); @@ -2533,7 +2415,7 @@ static CURLcode servercert(struct connectdata *conn, /* e.g. match issuer name with provided issuer certificate */ if(data->set.str[STRING_SSL_ISSUERCERT]) { - fp = fopen(data->set.str[STRING_SSL_ISSUERCERT], "r"); + fp=fopen(data->set.str[STRING_SSL_ISSUERCERT],"r"); if(!fp) { if(strict) failf(data, "SSL: Unable to open issuer cert (%s)", @@ -2542,8 +2424,7 @@ static CURLcode servercert(struct connectdata *conn, connssl->server_cert = NULL; return CURLE_SSL_ISSUER_ERROR; } - - issuer = PEM_read_X509(fp, NULL, ZERO_NULL, NULL); + issuer = PEM_read_X509(fp,NULL,ZERO_NULL,NULL); if(!issuer) { if(strict) failf(data, "SSL: Unable to read issuer cert (%s)", @@ -2553,9 +2434,7 @@ static CURLcode servercert(struct connectdata *conn, fclose(fp); return CURLE_SSL_ISSUER_ERROR; } - fclose(fp); - if(X509_check_issued(issuer,connssl->server_cert) != X509_V_OK) { if(strict) failf(data, "SSL: Certificate issuer check failed (%s)", @@ -2565,15 +2444,13 @@ static CURLcode servercert(struct connectdata *conn, connssl->server_cert = NULL; return CURLE_SSL_ISSUER_ERROR; } - infof(data, "\t SSL certificate issuer check ok (%s)\n", data->set.str[STRING_SSL_ISSUERCERT]); X509_free(issuer); } - lerr = data->set.ssl.certverifyresult = + lerr = data->set.ssl.certverifyresult= SSL_get_verify_result(connssl->handle); - if(data->set.ssl.certverifyresult != X509_V_OK) { if(data->set.ssl.verifypeer) { /* We probably never reach this, because SSL_connect() will fail @@ -2581,7 +2458,7 @@ static CURLcode servercert(struct connectdata *conn, if(strict) failf(data, "SSL certificate verify result: %s (%ld)", X509_verify_cert_error_string(lerr), lerr); - result = CURLE_PEER_FAILED_VERIFICATION; + retcode = CURLE_PEER_FAILED_VERIFICATION; } else infof(data, "\t SSL certificate verify result: %s (%ld)," @@ -2592,27 +2469,23 @@ static CURLcode servercert(struct connectdata *conn, infof(data, "\t SSL certificate verify ok.\n"); } - ptr = data->set.str[STRING_SSL_PINNEDPUBLICKEY]; - if(!result && ptr) { - result = pkp_pin_peer_pubkey(connssl->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; connssl->connecting_state = ssl_connect_done; - return result; + return retcode; } -static CURLcode ossl_connect_step3(struct connectdata *conn, int sockindex) + +static CURLcode +ossl_connect_step3(struct connectdata *conn, + int sockindex) { - CURLcode result = CURLE_OK; - void *old_ssl_sessionid = NULL; + CURLcode retcode = CURLE_OK; + void *old_ssl_sessionid=NULL; struct SessionHandle *data = conn->data; struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - bool incache; + int incache; SSL_SESSION *our_ssl_sessionid; DEBUGASSERT(ssl_connect_3 == connssl->connecting_state); @@ -2645,13 +2518,12 @@ static CURLcode ossl_connect_step3(struct connectdata *conn, int sockindex) incache = FALSE; } } - if(!incache) { - result = Curl_ssl_addsessionid(conn, our_ssl_sessionid, - 0 /* unknown size */); - if(result) { + retcode = Curl_ssl_addsessionid(conn, our_ssl_sessionid, + 0 /* unknown size */); + if(retcode) { failf(data, "failed to store ssl session"); - return result; + return retcode; } } #ifdef HAVE_SSL_GET1_SESSION @@ -2674,23 +2546,23 @@ static CURLcode ossl_connect_step3(struct connectdata *conn, int sockindex) if(!data->set.ssl.verifypeer && !data->set.ssl.verifyhost) (void)servercert(conn, connssl, FALSE); else - result = servercert(conn, connssl, TRUE); + retcode = servercert(conn, connssl, TRUE); - if(!result) + if(CURLE_OK == retcode) connssl->connecting_state = ssl_connect_done; - - return result; + return retcode; } static Curl_recv ossl_recv; static Curl_send ossl_send; -static CURLcode ossl_connect_common(struct connectdata *conn, - int sockindex, - bool nonblocking, - bool *done) +static CURLcode +ossl_connect_common(struct connectdata *conn, + int sockindex, + bool nonblocking, + bool *done) { - CURLcode result; + CURLcode retcode; struct SessionHandle *data = conn->data; struct ssl_connect_data *connssl = &conn->ssl[sockindex]; curl_socket_t sockfd = conn->sock[sockindex]; @@ -2703,7 +2575,7 @@ static CURLcode ossl_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); @@ -2712,10 +2584,9 @@ static CURLcode ossl_connect_common(struct connectdata *conn, failf(data, "SSL connection timeout"); return CURLE_OPERATION_TIMEDOUT; } - - result = ossl_connect_step1(conn, sockindex); - if(result) - return result; + retcode = ossl_connect_step1(conn, sockindex); + if(retcode) + return retcode; } while(ssl_connect_2 == connssl->connecting_state || @@ -2732,8 +2603,8 @@ static CURLcode ossl_connect_common(struct connectdata *conn, } /* if ssl is expecting something, check if it's available. */ - if(connssl->connecting_state == ssl_connect_2_reading || - connssl->connecting_state == ssl_connect_2_writing) { + if(connssl->connecting_state == ssl_connect_2_reading + || connssl->connecting_state == ssl_connect_2_writing) { curl_socket_t writefd = ssl_connect_2_writing== connssl->connecting_state?sockfd:CURL_SOCKET_BAD; @@ -2766,22 +2637,23 @@ static CURLcode ossl_connect_common(struct connectdata *conn, * before step2 has completed while ensuring that a client using select() * or epoll() will always have a valid fdset to wait on. */ - result = ossl_connect_step2(conn, sockindex); - if(result || (nonblocking && - (ssl_connect_2 == connssl->connecting_state || - ssl_connect_2_reading == connssl->connecting_state || - ssl_connect_2_writing == connssl->connecting_state))) - return result; + retcode = ossl_connect_step2(conn, sockindex); + if(retcode || (nonblocking && + (ssl_connect_2 == connssl->connecting_state || + ssl_connect_2_reading == connssl->connecting_state || + ssl_connect_2_writing == connssl->connecting_state))) + return retcode; } /* repeat step2 until all transactions are done. */ - if(ssl_connect_3 == connssl->connecting_state) { - result = ossl_connect_step3(conn, sockindex); - if(result) - return result; + + if(ssl_connect_3==connssl->connecting_state) { + retcode = ossl_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] = ossl_recv; conn->send[sockindex] = ossl_send; @@ -2796,28 +2668,32 @@ static CURLcode ossl_connect_common(struct connectdata *conn, return CURLE_OK; } -CURLcode Curl_ossl_connect_nonblocking(struct connectdata *conn, - int sockindex, - bool *done) +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) +CURLcode +Curl_ossl_connect(struct connectdata *conn, + int sockindex) { - CURLcode result; + CURLcode retcode; bool done = FALSE; - result = ossl_connect_common(conn, sockindex, FALSE, &done); - if(result) - return result; + retcode = ossl_connect_common(conn, sockindex, FALSE, &done); + if(retcode) + return retcode; DEBUGASSERT(done); return CURLE_OK; } -bool Curl_ossl_data_pending(const struct connectdata *conn, int connindex) +bool Curl_ossl_data_pending(const struct connectdata *conn, + int connindex) { if(conn->ssl[connindex].handle) /* SSL is in use */ @@ -2876,7 +2752,6 @@ static ssize_t ossl_send(struct connectdata *conn, *curlcode = CURLE_SEND_ERROR; return -1; } - *curlcode = CURLE_OK; return (ssize_t)rc; /* number of bytes */ } @@ -2938,9 +2813,8 @@ size_t Curl_ossl_version(char *buffer, size_t size) #if(SSLEAY_VERSION_NUMBER >= 0x905000) { - char sub[3]; + char sub[2]; unsigned long ssleay_value; - sub[2]='\0'; sub[1]='\0'; ssleay_value=SSLeay(); if(ssleay_value < 0x906000) { @@ -2949,31 +2823,14 @@ size_t Curl_ossl_version(char *buffer, size_t size) } else { if(ssleay_value&0xff0) { - int minor_ver = (ssleay_value >> 4) & 0xff; - if(minor_ver > 26) { - /* handle extended version introduced for 0.9.8za */ - sub[1] = (char) ((minor_ver - 1) % 26 + 'a' + 1); - sub[0] = 'z'; - } - else { - sub[0]=(char)(((ssleay_value>>4)&0xff) + 'a' -1); - } + sub[0]=(char)(((ssleay_value>>4)&0xff) + 'a' -1); } else sub[0]='\0'; } - return snprintf(buffer, size, "%s/%lx.%lx.%lx%s", -#ifdef OPENSSL_IS_BORINGSSL - "BoringSSL" -#else -#ifdef LIBRESSL_VERSION_NUMBER - "LibreSSL" -#else - "OpenSSL" -#endif -#endif - , (ssleay_value>>28)&0xf, + return snprintf(buffer, size, "OpenSSL/%lx.%lx.%lx%s", + (ssleay_value>>28)&0xf, (ssleay_value>>20)&0xff, (ssleay_value>>12)&0xff, sub); @@ -3008,14 +2865,11 @@ size_t Curl_ossl_version(char *buffer, size_t size) #endif /* YASSL_VERSION */ } -/* can be called with data == NULL */ -int Curl_ossl_random(struct SessionHandle *data, unsigned char *entropy, - size_t length) +void Curl_ossl_random(struct SessionHandle *data, unsigned char *entropy, + size_t length) { - if(data) - Curl_ossl_seed(data); /* Initiate the seed if not already done */ + Curl_ossl_seed(data); /* Initiate the seed if not already done */ RAND_bytes(entropy, curlx_uztosi(length)); - return 0; /* 0 as in no problem */ } void Curl_ossl_md5sum(unsigned char *tmp, /* input */ diff --git a/lib/vtls/openssl.h b/lib/vtls/openssl.h index 59b3158..07448b5 100644 --- a/lib/vtls/openssl.h +++ b/lib/vtls/openssl.h @@ -41,7 +41,7 @@ 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 SessionHandle *data); +int Curl_ossl_close_all(struct SessionHandle *data); /* Sets an OpenSSL engine */ CURLcode Curl_ossl_set_engine(struct SessionHandle *data, const char *engine); @@ -61,26 +61,21 @@ 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_seed(struct SessionHandle *data); + 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 */ -int Curl_ossl_random(struct SessionHandle *data, unsigned char *entropy, - size_t length); +void Curl_ossl_random(struct SessionHandle *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); -/* this backend supports the CAPATH option */ -#define have_curlssl_ca_path 1 - -/* this backend supports CURLOPT_CERTINFO */ -#define have_curlssl_certinfo 1 - -/* this backend suppots CURLOPT_SSL_CTX_* */ -#define have_curlssl_ssl_ctx 1 +/* this backend provides these functions: */ +#define have_curlssl_random 1 +#define have_curlssl_md5sum 1 /* API setup for OpenSSL */ #define curlssl_init Curl_ossl_init @@ -99,22 +94,8 @@ void Curl_ossl_md5sum(unsigned char *tmp, /* input */ #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) -#define CURL_SSL_BACKEND CURLSSLBACKEND_OPENSSL - -#ifdef TIZEN_TV_EXT -#define DEFAULT_CIPHER_SELECTION \ -"ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:" \ -"DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:ECDH-RSA-AES256-SHA:" \ -"ECDH-ECDSA-AES256-SHA:AES256-SHA:ECDHE-RSA-AES128-GCM-SHA256:" \ -"ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:" \ -"DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA:" \ -"AES128-GCM-SHA256:AES128-SHA256:AES128-SHA:" \ -"ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:" \ -"EDH-DSS-DES-CBC3-SHA:ECDH-RSA-DES-CBC3-SHA:ECDH-ECDSA-DES-CBC3-SHA:" \ -"DES-CBC3-SHA:ECDHE-RSA-RC4-SHA:ECDHE-ECDSA-RC4-SHA" -#else + #define DEFAULT_CIPHER_SELECTION "ALL!EXPORT!EXPORT40!EXPORT56!aNULL!LOW!RC4" -#endif #endif /* USE_SSLEAY */ #endif /* HEADER_CURL_SSLUSE_H */ diff --git a/lib/vtls/polarssl.c b/lib/vtls/polarssl.c index 05fcfc2..f948486 100644 --- a/lib/vtls/polarssl.c +++ b/lib/vtls/polarssl.c @@ -148,7 +148,7 @@ polarssl_connect_step1(struct connectdata *conn, void *old_session = NULL; size_t old_session_size = 0; char errorbuf[128]; - errorbuf[0]=0; + memset(errorbuf, 0, sizeof(errorbuf)); /* PolarSSL only supports SSLv3 and TLSv1 */ if(data->set.ssl.version == CURL_SSLVERSION_SSLv2) { @@ -201,22 +201,6 @@ polarssl_connect_step1(struct connectdata *conn, } } - if(data->set.str[STRING_SSL_CAPATH]) { - ret = x509_crt_parse_path(&connssl->cacert, - data->set.str[STRING_SSL_CAPATH]); - - if(ret<0) { -#ifdef POLARSSL_ERROR_C - error_strerror(ret, errorbuf, sizeof(errorbuf)); -#endif /* POLARSSL_ERROR_C */ - failf(data, "Error reading ca cert path %s - PolarSSL: (-0x%04X) %s", - data->set.str[STRING_SSL_CAPATH], -ret, errorbuf); - - if(data->set.ssl.verifypeer) - return CURLE_SSL_CACERT_BADFILE; - } - } - /* Load the client certificate */ memset(&connssl->clicert, 0, sizeof(x509_crt)); @@ -286,34 +270,6 @@ polarssl_connect_step1(struct connectdata *conn, return CURLE_SSL_CONNECT_ERROR; } - switch(data->set.ssl.version) { - default: - case CURL_SSLVERSION_DEFAULT: - ssl_set_min_version(&connssl->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_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); - 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); - 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); - infof(data, "PolarSSL: Forced min. SSL Version to be TLS 1.2\n"); - break; - } - ssl_set_endpoint(&connssl->ssl, SSL_IS_CLIENT); ssl_set_authmode(&connssl->ssl, SSL_VERIFY_OPTIONAL); @@ -358,7 +314,6 @@ polarssl_connect_step1(struct connectdata *conn, ssl_set_alpn_protocols(&connssl->ssl, protocols); infof(data, "ALPN, offering %s, %s\n", protocols[0], protocols[1]); - connssl->asked_for_h2 = TRUE; } } #endif @@ -386,7 +341,7 @@ polarssl_connect_step2(struct connectdata *conn, #endif char errorbuf[128]; - errorbuf[0] = 0; + memset(errorbuf, 0, sizeof(errorbuf)); conn->recv[sockindex] = polarssl_recv; conn->send[sockindex] = polarssl_send; @@ -467,7 +422,7 @@ polarssl_connect_step2(struct connectdata *conn, conn->negnpn = NPN_HTTP1_1; } } - else if(connssl->asked_for_h2) { + else { infof(data, "ALPN, server did not agree to a protocol\n"); } } @@ -483,12 +438,12 @@ static CURLcode polarssl_connect_step3(struct connectdata *conn, int sockindex) { - CURLcode result = CURLE_OK; + CURLcode retcode = CURLE_OK; struct ssl_connect_data *connssl = &conn->ssl[sockindex]; struct SessionHandle *data = conn->data; void *old_ssl_sessionid = NULL; ssl_session *our_ssl_sessionid = &conn->ssl[sockindex].ssn ; - bool incache; + int incache; DEBUGASSERT(ssl_connect_3 == connssl->connecting_state); @@ -501,21 +456,23 @@ polarssl_connect_step3(struct connectdata *conn, incache = FALSE; } } - if(!incache) { void *new_session = malloc(sizeof(ssl_session)); if(new_session) { - memcpy(new_session, our_ssl_sessionid, sizeof(ssl_session)); + memcpy(new_session, our_ssl_sessionid, + sizeof(ssl_session)); - result = Curl_ssl_addsessionid(conn, new_session, sizeof(ssl_session)); + retcode = Curl_ssl_addsessionid(conn, new_session, + sizeof(ssl_session)); + } + else { + retcode = CURLE_OUT_OF_MEMORY; } - else - result = CURLE_OUT_OF_MEMORY; - if(result) { + if(retcode) { failf(data, "failed to store ssl session"); - return result; + return retcode; } } @@ -602,7 +559,7 @@ polarssl_connect_common(struct connectdata *conn, bool nonblocking, bool *done) { - CURLcode result; + CURLcode retcode; struct SessionHandle *data = conn->data; struct ssl_connect_data *connssl = &conn->ssl[sockindex]; curl_socket_t sockfd = conn->sock[sockindex]; @@ -615,7 +572,7 @@ polarssl_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); @@ -624,10 +581,9 @@ polarssl_connect_common(struct connectdata *conn, failf(data, "SSL connection timeout"); return CURLE_OPERATION_TIMEDOUT; } - - result = polarssl_connect_step1(conn, sockindex); - if(result) - return result; + retcode = polarssl_connect_step1(conn, sockindex); + if(retcode) + return retcode; } while(ssl_connect_2 == connssl->connecting_state || @@ -644,8 +600,8 @@ polarssl_connect_common(struct connectdata *conn, } /* if ssl is expecting something, check if it's available. */ - if(connssl->connecting_state == ssl_connect_2_reading || - connssl->connecting_state == ssl_connect_2_writing) { + if(connssl->connecting_state == ssl_connect_2_reading + || connssl->connecting_state == ssl_connect_2_writing) { curl_socket_t writefd = ssl_connect_2_writing== connssl->connecting_state?sockfd:CURL_SOCKET_BAD; @@ -679,22 +635,22 @@ polarssl_connect_common(struct connectdata *conn, * ensuring that a client using select() or epoll() will always * have a valid fdset to wait on. */ - result = polarssl_connect_step2(conn, sockindex); - if(result || (nonblocking && - (ssl_connect_2 == connssl->connecting_state || - ssl_connect_2_reading == connssl->connecting_state || - ssl_connect_2_writing == connssl->connecting_state))) - return result; + retcode = polarssl_connect_step2(conn, sockindex); + if(retcode || (nonblocking && + (ssl_connect_2 == connssl->connecting_state || + ssl_connect_2_reading == connssl->connecting_state || + ssl_connect_2_writing == connssl->connecting_state))) + return retcode; } /* repeat step2 until all transactions are done. */ - if(ssl_connect_3 == connssl->connecting_state) { - result = polarssl_connect_step3(conn, sockindex); - if(result) - return result; + if(ssl_connect_3==connssl->connecting_state) { + retcode = polarssl_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] = polarssl_recv; conn->send[sockindex] = polarssl_send; @@ -722,12 +678,12 @@ CURLcode Curl_polarssl_connect(struct connectdata *conn, int sockindex) { - CURLcode result; + CURLcode retcode; bool done = FALSE; - result = polarssl_connect_common(conn, sockindex, FALSE, &done); - if(result) - return result; + retcode = polarssl_connect_common(conn, sockindex, FALSE, &done); + if(retcode) + return retcode; DEBUGASSERT(done); diff --git a/lib/vtls/polarssl.h b/lib/vtls/polarssl.h index 57dfb67..af3b28b 100644 --- a/lib/vtls/polarssl.h +++ b/lib/vtls/polarssl.h @@ -8,7 +8,6 @@ * \___|\___/|_| \_\_____| * * Copyright (C) 2010, Hoi-Ho Chan, - * Copyright (C) 2012 - 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 @@ -48,9 +47,6 @@ 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); -/* this backend supports the CAPATH option */ -#define have_curlssl_ca_path 1 - /* API setup for PolarSSL */ #define curlssl_init() polarssl_init() #define curlssl_cleanup() polarssl_cleanup() @@ -60,18 +56,12 @@ int Curl_polarssl_shutdown(struct connectdata *conn, int sockindex); #define curlssl_close_all Curl_polarssl_close_all #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_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_polarssl_version -#define curlssl_check_cxn(x) ((void)x, -1) -#define curlssl_data_pending(x,y) ((void)x, (void)y, 0) -#define CURL_SSL_BACKEND CURLSSLBACKEND_POLARSSL - -/* 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) +#define curlssl_check_cxn(x) (x=x, -1) +#define curlssl_data_pending(x,y) (x=x, y=y, 0) #endif /* USE_POLARSSL */ #endif /* HEADER_CURL_POLARSSL_H */ diff --git a/lib/vtls/qssl.c b/lib/vtls/qssl.c new file mode 100644 index 0000000..4c32053 --- /dev/null +++ b/lib/vtls/qssl.c @@ -0,0 +1,527 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2013, Daniel Stenberg, , 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 http://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_QSOSSL + +#include + +#ifdef HAVE_LIMITS_H +# include +#endif + +#include +#include "urldata.h" +#include "sendf.h" +#include "qssl.h" +#include "vtls.h" +#include "connect.h" /* for the connect timeout */ +#include "select.h" +#include "x509asn1.h" +#include "curl_memory.h" +/* The last #include file should be: */ +#include "memdebug.h" + + +int Curl_qsossl_init(void) + +{ + /* Nothing to do here. We must have connection data to initialize ssl, so + * defer. + */ + + return 1; +} + + +void Curl_qsossl_cleanup(void) + +{ + /* Nothing to do. */ +} + + +static CURLcode Curl_qsossl_init_session(struct SessionHandle * data) + +{ + int rc; + char * certname; + SSLInit initstr; + SSLInitApp initappstr; + + /* Initialize the job for SSL according to the current parameters. + * QsoSSL offers two ways to do it: SSL_Init_Application() that uses an + * application identifier to select certificates in the main certificate + * store, and SSL_Init() that uses named keyring files and a password. + * It is not possible to have different keyrings for the CAs and the + * local certificate. We thus use the certificate name to identify the + * keyring if given, else the CA file name. + * If the key file name is given, it is taken as the password for the + * keyring in certificate file. + * We first try to SSL_Init_Application(), then SSL_Init() if it failed. + */ + + certname = data->set.str[STRING_CERT]; + + if(!certname) { + certname = data->set.str[STRING_SSL_CAFILE]; + + if(!certname) + return CURLE_OK; /* Use previous setup. */ + } + + memset((char *) &initappstr, 0, sizeof initappstr); + initappstr.applicationID = certname; + initappstr.applicationIDLen = strlen(certname); + initappstr.protocol = SSL_VERSION_CURRENT; /* TLSV1 compat. SSLV[23]. */ + initappstr.sessionType = SSL_REGISTERED_AS_CLIENT; + rc = SSL_Init_Application(&initappstr); + + if(rc == SSL_ERROR_NOT_REGISTERED) { + initstr.keyringFileName = certname; + initstr.keyringPassword = data->set.str[STRING_KEY]; + initstr.cipherSuiteList = NULL; /* Use default. */ + initstr.cipherSuiteListLen = 0; + rc = SSL_Init(&initstr); + } + + switch (rc) { + + case 0: /* No error. */ + break; + + case SSL_ERROR_IO: + failf(data, "SSL_Init() I/O error: %s", strerror(errno)); + return CURLE_SSL_CONNECT_ERROR; + + case SSL_ERROR_BAD_CIPHER_SUITE: + return CURLE_SSL_CIPHER; + + case SSL_ERROR_KEYPASSWORD_EXPIRED: + case SSL_ERROR_NOT_REGISTERED: + return CURLE_SSL_CONNECT_ERROR; + + case SSL_ERROR_NO_KEYRING: + return CURLE_SSL_CACERT; + + case SSL_ERROR_CERT_EXPIRED: + return CURLE_SSL_CERTPROBLEM; + + default: + failf(data, "SSL_Init(): %s", SSL_Strerror(rc, NULL)); + return CURLE_SSL_CONNECT_ERROR; + } + + return CURLE_OK; +} + + +static CURLcode Curl_qsossl_create(struct connectdata * conn, int sockindex) + +{ + SSLHandle * h; + struct ssl_connect_data * connssl = &conn->ssl[sockindex]; + + h = SSL_Create(conn->sock[sockindex], SSL_ENCRYPT); + + if(!h) { + failf(conn->data, "SSL_Create() I/O error: %s", strerror(errno)); + return CURLE_SSL_CONNECT_ERROR; + } + + connssl->handle = h; + return CURLE_OK; +} + + +static int Curl_qsossl_trap_cert(SSLHandle * h) + +{ + return 1; /* Accept certificate. */ +} + + +static CURLcode Curl_qsossl_handshake(struct connectdata * conn, int sockindex) + +{ + int rc; + struct SessionHandle * data = conn->data; + struct ssl_connect_data * connssl = &conn->ssl[sockindex]; + SSLHandle * h = connssl->handle; + long timeout_ms; + + h->exitPgm = data->set.ssl.verifypeer? NULL: Curl_qsossl_trap_cert; + + /* figure out how long time we should wait at maximum */ + timeout_ms = Curl_timeleft(data, NULL, TRUE); + + if(timeout_ms < 0) { + /* time-out, bail out, go home */ + failf(data, "Connection time-out"); + return CURLE_OPERATION_TIMEDOUT; + } + + /* SSL_Handshake() timeout resolution is second, so round up. */ + h->timeout = (timeout_ms + 1000 - 1) / 1000; + + /* Set-up protocol. */ + + switch (data->set.ssl.version) { + + default: + case CURL_SSLVERSION_DEFAULT: + h->protocol = SSL_VERSION_CURRENT; /* TLSV1 compat. SSLV[23]. */ + break; + + case CURL_SSLVERSION_TLSv1: + h->protocol = TLS_VERSION_1; + break; + + case CURL_SSLVERSION_SSLv2: + h->protocol = SSL_VERSION_2; + break; + + case CURL_SSLVERSION_SSLv3: + h->protocol = SSL_VERSION_3; + break; + + case CURL_SSLVERSION_TLSv1_0: + case CURL_SSLVERSION_TLSv1_1: + case CURL_SSLVERSION_TLSv1_2: + failf(data, "TLS minor version cannot be set"); + return CURLE_SSL_CONNECT_ERROR; + } + + h->peerCert = NULL; + h->peerCertLen = 0; + rc = SSL_Handshake(h, SSL_HANDSHAKE_AS_CLIENT); + + switch (rc) { + + case 0: /* No error. */ + break; + + case SSL_ERROR_BAD_CERTIFICATE: + case SSL_ERROR_BAD_CERT_SIG: + case SSL_ERROR_NOT_TRUSTED_ROOT: + return CURLE_PEER_FAILED_VERIFICATION; + + case SSL_ERROR_BAD_CIPHER_SUITE: + case SSL_ERROR_NO_CIPHERS: + return CURLE_SSL_CIPHER; + + case SSL_ERROR_CERTIFICATE_REJECTED: + case SSL_ERROR_CERT_EXPIRED: + case SSL_ERROR_NO_CERTIFICATE: + return CURLE_SSL_CERTPROBLEM; + + case SSL_ERROR_IO: + failf(data, "SSL_Handshake() I/O error: %s", strerror(errno)); + return CURLE_SSL_CONNECT_ERROR; + + default: + failf(data, "SSL_Handshake(): %s", SSL_Strerror(rc, NULL)); + return CURLE_SSL_CONNECT_ERROR; + } + + /* Verify host. */ + rc = Curl_verifyhost(conn, h->peerCert, h->peerCert + h->peerCertLen); + if(rc != CURLE_OK) + return rc; + + /* Gather certificate info. */ + if(data->set.ssl.certinfo) { + if(Curl_ssl_init_certinfo(data, 1)) + return CURLE_OUT_OF_MEMORY; + if(h->peerCert) { + rc = Curl_extract_certinfo(conn, 0, h->peerCert, + h->peerCert + h->peerCertLen); + if(rc != CURLE_OK) + return rc; + } + } + + return CURLE_OK; +} + + +static Curl_recv qsossl_recv; +static Curl_send qsossl_send; + +CURLcode Curl_qsossl_connect(struct connectdata * conn, int sockindex) + +{ + struct SessionHandle * data = conn->data; + struct ssl_connect_data * connssl = &conn->ssl[sockindex]; + int rc; + + rc = Curl_qsossl_init_session(data); + + if(rc == CURLE_OK) { + rc = Curl_qsossl_create(conn, sockindex); + + if(rc == CURLE_OK) { + rc = Curl_qsossl_handshake(conn, sockindex); + if(rc != CURLE_OK) + SSL_Destroy(connssl->handle); + } + } + + if(rc == CURLE_OK) { + conn->recv[sockindex] = qsossl_recv; + conn->send[sockindex] = qsossl_send; + connssl->state = ssl_connection_complete; + } + else { + connssl->handle = NULL; + connssl->use = FALSE; + connssl->state = ssl_connection_none; + } + + return rc; +} + + +static int Curl_qsossl_close_one(struct ssl_connect_data * conn, + struct SessionHandle * data) + +{ + int rc; + + if(!conn->handle) + return 0; + + rc = SSL_Destroy(conn->handle); + + if(rc) { + if(rc == SSL_ERROR_IO) { + failf(data, "SSL_Destroy() I/O error: %s", strerror(errno)); + return -1; + } + + /* An SSL error. */ + failf(data, "SSL_Destroy() returned error %s", SSL_Strerror(rc, NULL)); + return -1; + } + + conn->handle = NULL; + return 0; +} + + +void Curl_qsossl_close(struct connectdata *conn, int sockindex) + +{ + struct SessionHandle *data = conn->data; + struct ssl_connect_data *connssl = &conn->ssl[sockindex]; + + if(connssl->use) + (void) Curl_qsossl_close_one(connssl, data); +} + + +int Curl_qsossl_close_all(struct SessionHandle * data) + +{ + /* Unimplemented. */ + (void) data; + return 0; +} + + +int Curl_qsossl_shutdown(struct connectdata * conn, int sockindex) + +{ + struct ssl_connect_data * connssl = &conn->ssl[sockindex]; + struct SessionHandle *data = conn->data; + ssize_t nread; + int what; + int rc; + char buf[120]; + + if(!connssl->handle) + return 0; + + if(data->set.ftp_ccc != CURLFTPSSL_CCC_ACTIVE) + return 0; + + if(Curl_qsossl_close_one(connssl, data)) + return -1; + + rc = 0; + + what = Curl_socket_ready(conn->sock[sockindex], + CURL_SOCKET_BAD, SSL_SHUTDOWN_TIMEOUT); + + for(;;) { + if(what < 0) { + /* anything that gets here is fatally bad */ + failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO); + rc = -1; + break; + } + + if(!what) { /* timeout */ + failf(data, "SSL shutdown timeout"); + break; + } + + /* Something to read, let's do it and hope that it is the close + notify alert from the server. No way to SSL_Read now, so use read(). */ + + nread = read(conn->sock[sockindex], buf, sizeof(buf)); + + if(nread < 0) { + failf(data, "read: %s", strerror(errno)); + rc = -1; + } + + if(nread <= 0) + break; + + what = Curl_socket_ready(conn->sock[sockindex], CURL_SOCKET_BAD, 0); + } + + return rc; +} + + +static ssize_t qsossl_send(struct connectdata * conn, int sockindex, + const void * mem, size_t len, CURLcode * curlcode) + +{ + /* SSL_Write() is said to return 'int' while write() and send() returns + 'size_t' */ + int rc; + + rc = SSL_Write(conn->ssl[sockindex].handle, (void *) mem, (int) len); + + if(rc < 0) { + switch(rc) { + + case SSL_ERROR_BAD_STATE: + /* The operation did not complete; the same SSL I/O function + should be called again later. This is basically an EWOULDBLOCK + equivalent. */ + *curlcode = CURLE_AGAIN; + return -1; + + case SSL_ERROR_IO: + switch (errno) { + case EWOULDBLOCK: + case EINTR: + *curlcode = CURLE_AGAIN; + return -1; + } + + failf(conn->data, "SSL_Write() I/O error: %s", strerror(errno)); + *curlcode = CURLE_SEND_ERROR; + return -1; + } + + /* An SSL error. */ + failf(conn->data, "SSL_Write() returned error %s", + SSL_Strerror(rc, NULL)); + *curlcode = CURLE_SEND_ERROR; + return -1; + } + + return (ssize_t) rc; /* number of bytes */ +} + + +static ssize_t qsossl_recv(struct connectdata * conn, int num, char * buf, + size_t buffersize, CURLcode * curlcode) + +{ + char error_buffer[120]; /* OpenSSL documents that this must be at + least 120 bytes long. */ + unsigned long sslerror; + int buffsize; + int nread; + + buffsize = (buffersize > (size_t)INT_MAX) ? INT_MAX : (int)buffersize; + nread = SSL_Read(conn->ssl[num].handle, buf, buffsize); + + if(nread < 0) { + /* failed SSL_read */ + + switch (nread) { + + case SSL_ERROR_BAD_STATE: + /* there's data pending, re-invoke SSL_Read(). */ + *curlcode = CURLE_AGAIN; + return -1; + + case SSL_ERROR_IO: + switch (errno) { + case EWOULDBLOCK: + *curlcode = CURLE_AGAIN; + return -1; + } + + failf(conn->data, "SSL_Read() I/O error: %s", strerror(errno)); + *curlcode = CURLE_RECV_ERROR; + return -1; + + default: + failf(conn->data, "SSL read error: %s", SSL_Strerror(nread, NULL)); + *curlcode = CURLE_RECV_ERROR; + return -1; + } + } + return (ssize_t) nread; +} + + +size_t Curl_qsossl_version(char * buffer, size_t size) + +{ + strncpy(buffer, "IBM OS/400 SSL", size); + return strlen(buffer); +} + + +int Curl_qsossl_check_cxn(struct connectdata * cxn) + +{ + int err; + int errlen; + + /* The only thing that can be tested here is at the socket level. */ + + if(!cxn->ssl[FIRSTSOCKET].handle) + return 0; /* connection has been closed */ + + err = 0; + errlen = sizeof err; + + if(getsockopt(cxn->sock[FIRSTSOCKET], SOL_SOCKET, SO_ERROR, + (unsigned char *) &err, &errlen) || + errlen != sizeof err || err) + return 0; /* connection has been closed */ + + return -1; /* connection status unknown */ +} + +#endif /* USE_QSOSSL */ diff --git a/lib/vtls/qssl.h b/lib/vtls/qssl.h new file mode 100644 index 0000000..c0ce155 --- /dev/null +++ b/lib/vtls/qssl.h @@ -0,0 +1,61 @@ +#ifndef HEADER_CURL_QSSL_H +#define HEADER_CURL_QSSL_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2013, Daniel Stenberg, , 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 http://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" + +/* + * This header should only be needed to get included by vtls.c and qssl.c + */ + +#include "urldata.h" + +#ifdef USE_QSOSSL +int Curl_qsossl_init(void); +void Curl_qsossl_cleanup(void); +CURLcode Curl_qsossl_connect(struct connectdata * conn, int sockindex); +void Curl_qsossl_close(struct connectdata *conn, int sockindex); +int Curl_qsossl_close_all(struct SessionHandle * data); +int Curl_qsossl_shutdown(struct connectdata * conn, int sockindex); + +size_t Curl_qsossl_version(char * buffer, size_t size); +int Curl_qsossl_check_cxn(struct connectdata * cxn); + +/* API setup for QsoSSL */ +#define curlssl_init Curl_qsossl_init +#define curlssl_cleanup Curl_qsossl_cleanup +#define curlssl_connect Curl_qsossl_connect + +/* No session handling for QsoSSL */ +#define curlssl_session_free(x) Curl_nop_stmt +#define curlssl_close_all Curl_qsossl_close_all +#define curlssl_close Curl_qsossl_close +#define curlssl_shutdown(x,y) Curl_qsossl_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_qsossl_version +#define curlssl_check_cxn(x) Curl_qsossl_check_cxn(x) +#define curlssl_data_pending(x,y) 0 +#endif /* USE_QSOSSL */ + +#endif /* HEADER_CURL_QSSL_H */ diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c index cf1df24..6c2295a 100644 --- a/lib/vtls/vtls.c +++ b/lib/vtls/vtls.c @@ -31,6 +31,7 @@ Curl_ossl_ - prefix for OpenSSL ones Curl_gtls_ - prefix for GnuTLS ones Curl_nss_ - prefix for NSS ones + Curl_qssl_ - prefix for QsoSSL ones Curl_gskit_ - prefix for GSKit ones Curl_polarssl_ - prefix for PolarSSL ones Curl_cyassl_ - prefix for CyaSSL ones @@ -59,6 +60,16 @@ #include "urldata.h" #include "vtls.h" /* generic SSL protos etc */ +#include "openssl.h" /* OpenSSL versions */ +#include "gtls.h" /* GnuTLS versions */ +#include "nssg.h" /* NSS versions */ +#include "qssl.h" /* QSOSSL versions */ +#include "gskit.h" /* Global Secure ToolKit versions */ +#include "polarssl.h" /* PolarSSL versions */ +#include "axtls.h" /* axTLS versions */ +#include "cyassl.h" /* CyaSSL versions */ +#include "curl_schannel.h" /* Schannel SSPI version */ +#include "curl_darwinssl.h" /* SecureTransport (Darwin) version */ #include "slist.h" #include "sendf.h" #include "rawstr.h" @@ -67,9 +78,6 @@ #include "progress.h" #include "share.h" #include "timeval.h" -#include "curl_md5.h" -#include "warnless.h" -#include "curl_base64.h" #define _MPRINTF_REPLACE /* use our functions only */ #include @@ -185,7 +193,7 @@ void Curl_free_ssl_config(struct ssl_config_data* sslc) unsigned int Curl_rand(struct SessionHandle *data) { - unsigned int r = 0; + unsigned int r; static unsigned int randseed; static bool seeded = FALSE; @@ -205,12 +213,14 @@ unsigned int Curl_rand(struct SessionHandle *data) } #endif - /* data may be NULL! */ - if(!Curl_ssl_random(data, (unsigned char *)&r, sizeof(r))) +#ifndef have_curlssl_random + (void)data; +#else + if(data) { + curlssl_random(data, (unsigned char *)&r, sizeof(r)); return r; - - /* If Curl_ssl_random() returns non-zero it couldn't offer randomness and we - instead perform a "best effort" */ + } +#endif #ifdef RANDOM_FILE if(!seeded) { @@ -228,7 +238,6 @@ unsigned int Curl_rand(struct SessionHandle *data) if(!seeded) { struct timeval now = curlx_tvnow(); - infof(data, "WARNING: Using weak random seed\n"); randseed += (unsigned int)now.tv_usec + (unsigned int)now.tv_sec; randseed = randseed * 1103515245 + 12345; randseed = randseed * 1103515245 + 12345; @@ -241,11 +250,6 @@ unsigned int Curl_rand(struct SessionHandle *data) return (r << 16) | ((r >> 16) & 0xFFFF); } -int Curl_ssl_backend(void) -{ - return (int)CURL_SSL_BACKEND; -} - #ifdef USE_SSL /* "global" init done? */ @@ -281,44 +285,44 @@ void Curl_ssl_cleanup(void) CURLcode Curl_ssl_connect(struct connectdata *conn, int sockindex) { - CURLcode result; + CURLcode res; /* mark this is being ssl-enabled from here on. */ conn->ssl[sockindex].use = TRUE; conn->ssl[sockindex].state = ssl_connection_negotiating; - result = curlssl_connect(conn, sockindex); + res = curlssl_connect(conn, sockindex); - if(!result) + if(!res) Curl_pgrsTime(conn->data, TIMER_APPCONNECT); /* SSL is connected */ - return result; + return res; } CURLcode Curl_ssl_connect_nonblocking(struct connectdata *conn, int sockindex, bool *done) { - CURLcode result; + CURLcode res; /* 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); + res = curlssl_connect_nonblocking(conn, sockindex, done); #else *done = TRUE; /* fallback to BLOCKING */ - result = curlssl_connect(conn, sockindex); + res = curlssl_connect(conn, sockindex); #endif /* non-blocking connect support */ - if(!result && *done) + if(!res && *done) Curl_pgrsTime(conn->data, TIMER_APPCONNECT); /* SSL is connected */ - return result; + return res; } /* * Check if there's a session ID for the given connection in the cache, and if * there's one suitable, it is provided. Returns TRUE when no entry matched. */ -bool Curl_ssl_getsessionid(struct connectdata *conn, - void **ssl_sessionid, - size_t *idsize) /* set 0 if unknown */ +int Curl_ssl_getsessionid(struct connectdata *conn, + void **ssl_sessionid, + size_t *idsize) /* set 0 if unknown */ { struct curl_ssl_session *check; struct SessionHandle *data = conn->data; @@ -593,37 +597,34 @@ void Curl_ssl_free_certinfo(struct SessionHandle *data) { int i; struct curl_certinfo *ci = &data->info.certs; - if(ci->num_of_certs) { /* free all individual lists used */ for(i=0; inum_of_certs; i++) { curl_slist_free_all(ci->certinfo[i]); ci->certinfo[i] = NULL; } - free(ci->certinfo); /* free the actual array too */ ci->certinfo = NULL; ci->num_of_certs = 0; } } -CURLcode Curl_ssl_init_certinfo(struct SessionHandle *data, int num) +int Curl_ssl_init_certinfo(struct SessionHandle * data, + int num) { - struct curl_certinfo *ci = &data->info.certs; - struct curl_slist **table; + struct curl_certinfo * ci = &data->info.certs; + struct curl_slist * * table; - /* Free any previous certificate information structures */ + /* Initialize the certificate information structures. Return 0 if OK, else 1. + */ Curl_ssl_free_certinfo(data); - - /* Allocate the required certificate information structures */ + ci->num_of_certs = num; table = calloc((size_t) num, sizeof(struct curl_slist *)); if(!table) - return CURLE_OUT_OF_MEMORY; + return 1; - ci->num_of_certs = num; ci->certinfo = table; - - return CURLE_OK; + return 0; } /* @@ -638,7 +639,7 @@ CURLcode Curl_ssl_push_certinfo_len(struct SessionHandle *data, struct curl_certinfo * ci = &data->info.certs; char * output; struct curl_slist * nl; - CURLcode result = CURLE_OK; + CURLcode res = CURLE_OK; size_t labellen = strlen(label); size_t outlen = labellen + 1 + valuelen + 1; /* label:value\0 */ @@ -659,11 +660,11 @@ CURLcode Curl_ssl_push_certinfo_len(struct SessionHandle *data, if(!nl) { free(output); curl_slist_free_all(ci->certinfo[certnum]); - result = CURLE_OUT_OF_MEMORY; + res = CURLE_OUT_OF_MEMORY; } ci->certinfo[certnum] = nl; - return result; + return res; } /* @@ -680,184 +681,14 @@ CURLcode Curl_ssl_push_certinfo(struct SessionHandle *data, return Curl_ssl_push_certinfo_len(data, certnum, label, value, valuelen); } -int Curl_ssl_random(struct SessionHandle *data, - unsigned char *entropy, - size_t length) -{ - return curlssl_random(data, entropy, length); -} - -/* - * Public key pem to der conversion - */ - -static CURLcode pubkey_pem_to_der(const char *pem, - unsigned char **der, size_t *der_len) -{ - char *stripped_pem, *begin_pos, *end_pos; - size_t pem_count, stripped_pem_count = 0, pem_len; - CURLcode result; - - /* if no pem, exit. */ - if(!pem) - return CURLE_BAD_CONTENT_ENCODING; - - begin_pos = strstr(pem, "-----BEGIN PUBLIC KEY-----"); - if(!begin_pos) - return CURLE_BAD_CONTENT_ENCODING; - - pem_count = begin_pos - pem; - /* Invalid if not at beginning AND not directly following \n */ - if(0 != pem_count && '\n' != pem[pem_count - 1]) - return CURLE_BAD_CONTENT_ENCODING; - - /* 26 is length of "-----BEGIN PUBLIC KEY-----" */ - pem_count += 26; - - /* Invalid if not directly following \n */ - end_pos = strstr(pem + pem_count, "\n-----END PUBLIC KEY-----"); - if(!end_pos) - return CURLE_BAD_CONTENT_ENCODING; - - pem_len = end_pos - pem; - - stripped_pem = malloc(pem_len - pem_count + 1); - if(!stripped_pem) - return CURLE_OUT_OF_MEMORY; - - /* - * Here we loop through the pem array one character at a time between the - * correct indices, and place each character that is not '\n' or '\r' - * into the stripped_pem array, which should represent the raw base64 string - */ - while(pem_count < pem_len) { - if('\n' != pem[pem_count] && '\r' != pem[pem_count]) - stripped_pem[stripped_pem_count++] = pem[pem_count]; - ++pem_count; - } - /* Place the null terminator in the correct place */ - stripped_pem[stripped_pem_count] = '\0'; - - result = Curl_base64_decode(stripped_pem, der, der_len); - - Curl_safefree(stripped_pem); - - return result; -} - -/* - * Generic pinned public key check. - */ - -CURLcode Curl_pin_peer_pubkey(const char *pinnedpubkey, - const unsigned char *pubkey, size_t pubkeylen) -{ - FILE *fp; - unsigned char *buf = NULL, *pem_ptr = NULL; - long filesize; - size_t size, pem_len; - CURLcode pem_read; - CURLcode result = CURLE_SSL_PINNEDPUBKEYNOTMATCH; - - /* if a path wasn't specified, don't pin */ - if(!pinnedpubkey) - return CURLE_OK; - if(!pubkey || !pubkeylen) - return result; - fp = fopen(pinnedpubkey, "rb"); - if(!fp) - return result; - - do { - /* Determine the file's size */ - if(fseek(fp, 0, SEEK_END)) - break; - filesize = ftell(fp); - if(fseek(fp, 0, SEEK_SET)) - break; - if(filesize < 0 || filesize > MAX_PINNED_PUBKEY_SIZE) - break; - - /* - * if the size of our certificate is bigger than the file - * size then it can't match - */ - size = curlx_sotouz((curl_off_t) filesize); - if(pubkeylen > size) - break; - - /* - * Allocate buffer for the pinned key - * With 1 additional byte for null terminator in case of PEM key - */ - buf = malloc(size + 1); - if(!buf) - break; - - /* Returns number of elements read, which should be 1 */ - if((int) fread(buf, size, 1, fp) != 1) - break; - - /* If the sizes are the same, it can't be base64 encoded, must be der */ - if(pubkeylen == size) { - if(!memcmp(pubkey, buf, pubkeylen)) - result = CURLE_OK; - break; - } - - /* - * Otherwise we will assume it's PEM and try to decode it - * after placing null terminator - */ - buf[size] = '\0'; - pem_read = pubkey_pem_to_der((const char *)buf, &pem_ptr, &pem_len); - /* if it wasn't read successfully, exit */ - if(pem_read) - break; - - /* - * if the size of our certificate doesn't match the size of - * the decoded file, they can't be the same, otherwise compare - */ - if(pubkeylen == pem_len && !memcmp(pubkey, pem_ptr, pubkeylen)) - result = CURLE_OK; - } while(0); - - Curl_safefree(buf); - Curl_safefree(pem_ptr); - fclose(fp); - - return result; -} - +#ifdef have_curlssl_md5sum void Curl_ssl_md5sum(unsigned char *tmp, /* input */ size_t tmplen, unsigned char *md5sum, /* output */ size_t md5len) { -#ifdef curlssl_md5sum curlssl_md5sum(tmp, tmplen, md5sum, md5len); -#else - MD5_context *MD5pw; - - (void) md5len; - - MD5pw = Curl_MD5_init(Curl_DIGEST_MD5); - Curl_MD5_update(MD5pw, tmp, curlx_uztoui(tmplen)); - Curl_MD5_final(MD5pw, md5sum); -#endif } - -/* - * Check whether the SSL backend supports the status_request extension. - */ -bool Curl_ssl_cert_status_request(void) -{ -#ifdef curlssl_cert_status_request - return curlssl_cert_status_request(); -#else - return FALSE; #endif -} #endif /* USE_SSL */ diff --git a/lib/vtls/vtls.h b/lib/vtls/vtls.h index eedf921..d309da6 100644 --- a/lib/vtls/vtls.h +++ b/lib/vtls/vtls.h @@ -23,20 +23,6 @@ ***************************************************************************/ #include "curl_setup.h" -#include "openssl.h" /* OpenSSL versions */ -#include "gtls.h" /* GnuTLS versions */ -#include "nssg.h" /* NSS versions */ -#include "gskit.h" /* Global Secure ToolKit versions */ -#include "polarssl.h" /* PolarSSL versions */ -#include "axtls.h" /* axTLS versions */ -#include "cyassl.h" /* CyaSSL versions */ -#include "curl_schannel.h" /* Schannel SSPI version */ -#include "curl_darwinssl.h" /* SecureTransport (Darwin) version */ - -#ifndef MAX_PINNED_PUBKEY_SIZE -#define MAX_PINNED_PUBKEY_SIZE 1048576 /* 1MB */ -#endif - #ifndef MD5_DIGEST_LENGTH #define MD5_DIGEST_LENGTH 16 /* fixed size */ #endif @@ -53,8 +39,6 @@ void Curl_free_ssl_config(struct ssl_config_data* sslc); unsigned int Curl_rand(struct SessionHandle *); -int Curl_ssl_backend(void); - #ifdef USE_SSL int Curl_ssl_init(void); void Curl_ssl_cleanup(void); @@ -82,7 +66,7 @@ int Curl_ssl_check_cxn(struct connectdata *conn); /* Certificate information list handling. */ void Curl_ssl_free_certinfo(struct SessionHandle *data); -CURLcode Curl_ssl_init_certinfo(struct SessionHandle * data, int num); +int Curl_ssl_init_certinfo(struct SessionHandle * data, int num); CURLcode Curl_ssl_push_certinfo_len(struct SessionHandle * data, int certnum, const char * label, const char * value, size_t valuelen); @@ -92,9 +76,9 @@ CURLcode Curl_ssl_push_certinfo(struct SessionHandle * data, int certnum, /* Functions to be used by SSL library adaptation functions */ /* extract a session ID */ -bool Curl_ssl_getsessionid(struct connectdata *conn, - void **ssl_sessionid, - size_t *idsize) /* set 0 if unknown */; +int Curl_ssl_getsessionid(struct connectdata *conn, + void **ssl_sessionid, + size_t *idsize) /* set 0 if unknown */; /* add a new session ID */ CURLcode Curl_ssl_addsessionid(struct connectdata *conn, void *ssl_sessionid, @@ -104,22 +88,21 @@ void Curl_ssl_kill_session(struct curl_ssl_session *session); /* delete a session from the cache */ void Curl_ssl_delsessionid(struct connectdata *conn, void *ssl_sessionid); -/* get N random bytes into the buffer, return 0 if a find random is filled - in */ -int Curl_ssl_random(struct SessionHandle *data, unsigned char *buffer, - size_t length); +/* get N random bytes into the buffer */ void Curl_ssl_md5sum(unsigned char *tmp, /* input */ size_t tmplen, unsigned char *md5sum, /* output */ size_t md5len); -/* Check pinned public key. */ -CURLcode Curl_pin_peer_pubkey(const char *pinnedpubkey, - const unsigned char *pubkey, size_t pubkeylen); - -bool Curl_ssl_cert_status_request(void); #define SSL_SHUTDOWN_TIMEOUT 10000 /* ms */ +#ifdef have_curlssl_random +#define HAVE_CURL_SSL_RANDOM +#endif +#ifdef have_curlssl_md5sum +#define HAVE_CURL_SSL_MD5SUM +#endif + #else /* When SSL support is not present, just define away these function calls */ #define Curl_ssl_init() 1 @@ -140,8 +123,6 @@ bool Curl_ssl_cert_status_request(void); #define Curl_ssl_free_certinfo(x) Curl_nop_stmt #define Curl_ssl_connect_nonblocking(x,y,z) CURLE_NOT_BUILT_IN #define Curl_ssl_kill_session(x) Curl_nop_stmt -#define Curl_ssl_random(x,y,z) ((void)x, CURLE_NOT_BUILT_IN) -#define CURL_SSL_BACKEND CURLSSLBACKEND_NONE #endif #endif /* HEADER_CURL_VTLS_H */ diff --git a/lib/x509asn1.c b/lib/x509asn1.c index af08cee..1f87155 100644 --- a/lib/x509asn1.c +++ b/lib/x509asn1.c @@ -22,7 +22,7 @@ #include "curl_setup.h" -#if defined(USE_GSKIT) || defined(USE_NSS) +#if defined(USE_QSOSSL) || defined(USE_GSKIT) || defined(USE_NSS) #include #include "urldata.h" @@ -122,7 +122,6 @@ const char * Curl_getASN1Element(curl_asn1Element * elem, return (const char *) NULL; /* Process header byte. */ - elem->header = beg; b = (unsigned char) *beg++; elem->constructed = (b & 0x20) != 0; elem->class = (b >> 6) & 3; @@ -683,7 +682,6 @@ void Curl_parseX509(curl_X509certificate * cert, Syntax is assumed to have already been checked by the SSL backend. See RFC 5280. */ - cert->certificate.header = NULL; cert->certificate.beg = beg; cert->certificate.end = end; @@ -703,7 +701,6 @@ void Curl_parseX509(curl_X509certificate * cert, beg = tbsCertificate.beg; end = tbsCertificate.end; /* Get optional version, get serialNumber. */ - cert->version.header = NULL; cert->version.beg = &defaultVersion; cert->version.end = &defaultVersion + sizeof defaultVersion;; beg = Curl_getASN1Element(&elem, beg, end); @@ -723,19 +720,15 @@ void Curl_parseX509(curl_X509certificate * cert, /* Get subject. */ beg = Curl_getASN1Element(&cert->subject, beg, end); /* Get subjectPublicKeyAlgorithm and subjectPublicKey. */ - beg = Curl_getASN1Element(&cert->subjectPublicKeyInfo, beg, end); + beg = Curl_getASN1Element(&elem, beg, end); ccp = Curl_getASN1Element(&cert->subjectPublicKeyAlgorithm, - cert->subjectPublicKeyInfo.beg, - cert->subjectPublicKeyInfo.end); - Curl_getASN1Element(&cert->subjectPublicKey, ccp, - cert->subjectPublicKeyInfo.end); + elem.beg, elem.end); + Curl_getASN1Element(&cert->subjectPublicKey, ccp, elem.end); /* Get optional issuerUiqueID, subjectUniqueID and extensions. */ cert->issuerUniqueID.tag = cert->subjectUniqueID.tag = 0; cert->extensions.tag = elem.tag = 0; - cert->issuerUniqueID.header = cert->subjectUniqueID.header = NULL; cert->issuerUniqueID.beg = cert->issuerUniqueID.end = ""; cert->subjectUniqueID.beg = cert->subjectUniqueID.end = ""; - cert->extensions.header = NULL; cert->extensions.beg = cert->extensions.end = ""; if(beg < end) beg = Curl_getASN1Element(&elem, beg, end); @@ -778,7 +771,6 @@ static const char * dumpAlgo(curl_asn1Element * param, /* Get algorithm parameters and return algorithm name. */ beg = Curl_getASN1Element(&oid, beg, end); - param->header = NULL; param->tag = 0; param->beg = param->end = end; if(beg < end) @@ -879,7 +871,7 @@ CURLcode Curl_extract_certinfo(struct connectdata * conn, char * cp1; size_t cl1; char * cp2; - CURLcode result; + CURLcode cc; unsigned long version; size_t i; size_t j; @@ -993,11 +985,11 @@ CURLcode Curl_extract_certinfo(struct connectdata * conn, free((char *) ccp); /* Generate PEM certificate. */ - result = Curl_base64_encode(data, cert.certificate.beg, - cert.certificate.end - cert.certificate.beg, - &cp1, &cl1); - if(result) - return result; + cc = Curl_base64_encode(data, cert.certificate.beg, + cert.certificate.end - cert.certificate.beg, + &cp1, &cl1); + if(cc != CURLE_OK) + return cc; /* Compute the number of characters in final certificate string. Format is: -----BEGIN CERTIFICATE-----\n \n @@ -1027,9 +1019,9 @@ CURLcode Curl_extract_certinfo(struct connectdata * conn, return CURLE_OK; } -#endif /* USE_GSKIT or USE_NSS */ +#endif /* USE_QSOSSL or USE_GSKIT or USE_NSS */ -#if defined(USE_GSKIT) +#if defined(USE_QSOSSL) || defined(USE_GSKIT) static const char * checkOID(const char * beg, const char * end, const char * oid) @@ -1148,7 +1140,6 @@ CURLcode Curl_verifyhost(struct connectdata * conn, } /* Process subject. */ - name.header = NULL; name.beg = name.end = ""; q = cert.subject.beg; /* we have to look to the last occurrence of a commonName in the @@ -1189,4 +1180,4 @@ CURLcode Curl_verifyhost(struct connectdata * conn, return CURLE_PEER_FAILED_VERIFICATION; } -#endif /* USE_GSKIT */ +#endif /* USE_QSOSSL or USE_GSKIT */ diff --git a/lib/x509asn1.h b/lib/x509asn1.h index 075c424..1741d6d 100644 --- a/lib/x509asn1.h +++ b/lib/x509asn1.h @@ -8,7 +8,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , 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 @@ #include "curl_setup.h" -#if defined(USE_GSKIT) || defined(USE_NSS) +#if defined(USE_QSOSSL) || defined(USE_GSKIT) || defined(USE_NSS) #include "urldata.h" @@ -76,9 +76,8 @@ /* ASN.1 parsed element. */ typedef struct { - const char * header; /* Pointer to header byte. */ const char * beg; /* Pointer to element data. */ - const char * end; /* Pointer to 1st byte after element. */ + const char * end; /* Pointer to 1st byte after element data. */ unsigned char class; /* ASN.1 element class. */ unsigned char tag; /* ASN.1 element tag. */ bool constructed; /* Element is constructed. */ @@ -103,7 +102,6 @@ typedef struct { curl_asn1Element notBefore; curl_asn1Element notAfter; curl_asn1Element subject; - curl_asn1Element subjectPublicKeyInfo; curl_asn1Element subjectPublicKeyAlgorithm; curl_asn1Element subjectPublicKey; curl_asn1Element issuerUniqueID; @@ -127,5 +125,5 @@ CURLcode Curl_extract_certinfo(struct connectdata * conn, int certnum, CURLcode Curl_verifyhost(struct connectdata * conn, const char * beg, const char * end); -#endif /* USE_GSKIT or USE_NSS */ +#endif /* USE_QSOSSL or USE_GSKIT or USE_NSS */ #endif /* HEADER_CURL_X509ASN1_H */ diff --git a/maketgz b/maketgz index 5aba1a3..2967eb3 100755 --- a/maketgz +++ b/maketgz @@ -9,7 +9,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +# 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 diff --git a/mkinstalldirs b/mkinstalldirs index 55d537f..4191a45 100755 --- a/mkinstalldirs +++ b/mkinstalldirs @@ -81,9 +81,9 @@ case $dirmode in echo "mkdir -p -- $*" exec mkdir -p -- "$@" else - # On NextStep and OpenStep, the 'mkdir' command does not + # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as - # directories to create, and then abort because '.' already + # directories to create, and then abort because `.' already # exists. test -d ./-p && rmdir ./-p test -d ./--version && rmdir ./--version diff --git a/packages/DOS/common.dj b/packages/DOS/common.dj index 85b611c..1b3e757 100644 --- a/packages/DOS/common.dj +++ b/packages/DOS/common.dj @@ -13,7 +13,7 @@ MAKEFILE = Makefile.dj OBJ_DIR = djgpp # -# Find out if using a Unix-like shell or a DOS command interpreter +# Find out if using a UNIX-like shell or a DOS command interpreter # ifneq ($(findstring COMMAND.COM,$(SHELL)),COMMAND.COM) ifneq ($(findstring CMD.EXE,$(SHELL)),CMD.EXE) diff --git a/packages/EPM/README b/packages/EPM/README index 0b031e8..3529dbf 100644 --- a/packages/EPM/README +++ b/packages/EPM/README @@ -1,4 +1,4 @@ -EPM is a free Unix software/file packaging program that generates distribution +EPM is a free UNIX software/file packaging program that generates distribution archives from a list of files. EPM Can: * Generate portable script-based distribution packages complete with diff --git a/packages/OS400/README.OS400 b/packages/OS400/README.OS400 index 99b606c..06e6632 100644 --- a/packages/OS400/README.OS400 +++ b/packages/OS400/README.OS400 @@ -39,9 +39,12 @@ header files are thus altered during build process to use this pragma, in order to force libcurl enums of being type int (the pragma disposition in use before inclusion is restored before resuming the including unit compilation). - Secure socket layer is provided by the IBM GSKit API: unlike other SSL -implementations, GSKit is based on "certificate stores" or keyrings -rather than individual certificate/key files. Certificate stores, as well as + Two SSL implementations are available to libcurl on OS/400: QsoSSL which is +obsolescent, does not support asynchronous I/O and only allows a single SSL +context within a job, and GSKit that does not suffer from these limitations +and is able to provide some information about the server certificate. + Both implementations of SSL are working on "certificate stores" or keyrings, +rather than individual certificate/key files. Certificate stores, as weel as "certificate labels" are managed by external IBM-defined applications. There are two ways to specify an SSL context: - By an application identifier. @@ -88,7 +91,6 @@ options: CURLOPT_NETRC_FILE CURLOPT_NOPROXY CURLOPT_PASSWORD - CURLOPT_PINNEDPUBLICKEY CURLOPT_PROXY CURLOPT_PROXYPASSWORD CURLOPT_PROXYUSERNAME @@ -113,7 +115,6 @@ options: CURLOPT_TLSAUTH_PASSWORD CURLOPT_TLSAUTH_TYPE CURLOPT_TLSAUTH_USERNAME - CURLOPT_UNIX_SOCKET_PATH CURLOPT_URL CURLOPT_USERAGENT CURLOPT_USERNAME @@ -211,6 +212,8 @@ _ As a prerequisite, QADRT development environment must be installed. _ Install the curl source directory in IFS. _ Enter shell (QSH) _ Change current directory to the curl installation directory +- If the SSL backend has to be changed, edit file lib/config-os400.h + accordingly. _ Change current directory to ./packages/OS400 _ Edit file iniscript.sh. You may want to change tunable configuration parameters, like debug info generation, optimisation level, listing option, diff --git a/packages/OS400/ccsidcurl.c b/packages/OS400/ccsidcurl.c index d0e6827..34ca8dc 100644 --- a/packages/OS400/ccsidcurl.c +++ b/packages/OS400/ccsidcurl.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -167,6 +167,7 @@ dynconvert(int dccsid, const char * s, int slen, int sccsid) char * cp; size_t dlen; int l; + int l2; static const char nullbyte = 0; /* Like convert, but the destination is allocated and returned. */ @@ -190,7 +191,7 @@ dynconvert(int dccsid, const char * s, int slen, int sccsid) Since destination code size is unknown, use a conversion to generate terminator. */ - int l2 = convert(d + l, dlen - l, dccsid, &nullbyte, -1, ASCII_CCSID); + l2 = convert(d + l, dlen - l, dccsid, &nullbyte, -1, ASCII_CCSID); if(l2 < 0) { free(d); @@ -216,11 +217,10 @@ slist_convert(int dccsid, struct curl_slist * from, int sccsid) { struct curl_slist * to = (struct curl_slist *) NULL; + char * cp; for(; from; from = from->next) { - char * cp = dynconvert(dccsid, from->data, -1, sccsid); - - if(!cp) { + if(!(cp = dynconvert(dccsid, from->data, -1, sccsid))) { curl_slist_free_all(to); return (struct curl_slist *) NULL; } @@ -269,7 +269,7 @@ curl_easy_escape_ccsid(CURL * handle, const char * string, int length, return (char *) NULL; } - s = dynconvert(ASCII_CCSID, string, length? length: -1, sccsid); + s = dynconvert(ASCII_CCSID, s, length? length: -1, sccsid); if(!s) return (char *) NULL; @@ -300,7 +300,7 @@ curl_easy_unescape_ccsid(CURL * handle, const char * string, int length, return (char *) NULL; } - s = dynconvert(ASCII_CCSID, string, length? length: -1, sccsid); + s = dynconvert(ASCII_CCSID, s, length? length: -1, sccsid); if(!s) return (char *) NULL; @@ -370,13 +370,15 @@ convert_version_info_string(const char * * stringp, char * * bufp, int * left, unsigned int ccsid) { + int l; + /* Helper for curl_version_info_ccsid(): convert a string if defined. Result is stored in the `*left'-byte buffer at `*bufp'. `*bufp' and `*left' are updated accordingly. Return 0 if ok, else -1. */ if(*stringp) { - int l = convert(*bufp, *left, ccsid, *stringp, -1, ASCII_CCSID); + l = convert(*bufp, *left, ccsid, *stringp, -1, ASCII_CCSID); if(l <= 0) return -1; @@ -398,6 +400,7 @@ curl_version_info_ccsid(CURLversion stamp, unsigned int ccsid) char * cp; int n; int nproto; + int i; curl_version_info_data * id; /* The assertion below is possible, because although the second operand @@ -470,9 +473,8 @@ curl_version_info_ccsid(CURLversion stamp, unsigned int ccsid) memcpy((char *) id, (char *) p, sizeof *p); if(id->protocols) { - int i = nproto * sizeof id->protocols[0]; - id->protocols = (const char * const *) cp; + i = nproto * sizeof id->protocols[0]; memcpy(cp, (char *) p->protocols, i); cp += i; n -= i; @@ -587,11 +589,11 @@ void curl_certinfo_free_all(struct curl_certinfo *info) { + int i; + /* Free all memory used by certificate info. */ if(info) { if(info->certinfo) { - int i; - for(i = 0; i < info->num_of_certs; i++) curl_slist_free_all(info->certinfo[i]); free((char *) info->certinfo); @@ -610,10 +612,13 @@ curl_easy_getinfo_ccsid(CURL * curl, CURLINFO info, ...) CURLcode ret; unsigned int ccsid; char * * cpp; + char * s; + char * d; struct SessionHandle * data; struct curl_slist * * slp; struct curl_certinfo * cipf; struct curl_certinfo * cipt; + int i; /* WARNING: unlike curl_easy_get_info(), the strings returned by this procedure have to be free'ed. */ @@ -629,11 +634,13 @@ curl_easy_getinfo_ccsid(CURL * curl, CURLINFO info, ...) case CURLINFO_STRING: ccsid = va_arg(arg, unsigned int); cpp = (char * *) paramp; + s = *cpp; - if(*cpp) { - *cpp = dynconvert(ccsid, *cpp, -1, ASCII_CCSID); + if(s) { + d = dynconvert(ccsid, s, -1, ASCII_CCSID); + *cpp = d; - if(!*cpp) + if(!d) ret = CURLE_OUT_OF_MEMORY; } @@ -654,8 +661,6 @@ curl_easy_getinfo_ccsid(CURL * curl, CURLINFO info, ...) if(!cipt->certinfo) ret = CURLE_OUT_OF_MEMORY; else { - int i; - cipt->num_of_certs = cipf->num_of_certs; for(i = 0; i < cipf->num_of_certs; i++) if(cipf->certinfo[i]) @@ -1102,6 +1107,7 @@ curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...) char * s; char * cp; unsigned int ccsid; + size_t len; curl_off_t pfsize; static char testwarn = 1; @@ -1114,8 +1120,7 @@ curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...) if(testwarn) { testwarn = 0; - if((int) STRING_LASTZEROTERMINATED != (int) STRING_UNIX_SOCKET_PATH + 1 || - (int) STRING_LAST != (int) STRING_COPYPOSTFIELDS + 1) + if((int) STRING_LAST != (int) STRING_BEARER + 1) curl_mfprintf(stderr, "*** WARNING: curl_easy_setopt_ccsid() should be reworked ***\n"); } @@ -1149,7 +1154,6 @@ curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...) case CURLOPT_NETRC_FILE: case CURLOPT_NOPROXY: case CURLOPT_PASSWORD: - case CURLOPT_PINNEDPUBLICKEY: case CURLOPT_PROXY: case CURLOPT_PROXYPASSWORD: case CURLOPT_PROXYUSERNAME: @@ -1174,7 +1178,6 @@ curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...) case CURLOPT_TLSAUTH_PASSWORD: case CURLOPT_TLSAUTH_TYPE: case CURLOPT_TLSAUTH_USERNAME: - case CURLOPT_UNIX_SOCKET_PATH: case CURLOPT_URL: case CURLOPT_USERAGENT: case CURLOPT_USERNAME: @@ -1224,7 +1227,6 @@ curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...) } else { /* Data length specified. */ - size_t len; if(pfsize < 0 || pfsize > SIZE_MAX) { result = CURLE_OUT_OF_MEMORY; diff --git a/packages/OS400/curl.inc.in b/packages/OS400/curl.inc.in index fcbf7c7..565df61 100644 --- a/packages/OS400/curl.inc.in +++ b/packages/OS400/curl.inc.in @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , 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 @@ d CURL_VERSION_NTLM... d c X'00000010' d CURL_VERSION_GSSNEGOTIATE... - d c X'00000020' Deprecated + d c X'00000020' d CURL_VERSION_DEBUG... d c X'00000040' d CURL_VERSION_ASYNCHDNS... @@ -117,12 +117,6 @@ d c X'00008000' d CURL_VERSION_HTTP2... d c X'00010000' - d CURL_VERSION_GSSAPI... - d c X'00020000' - d CURL_VERSION_KERBEROS5... - d c X'00040000' - d CURL_VERSION_UNIX_SOCKETS... - d c X'00080000' * d HTTPPOST_FILENAME... d c X'00000001' @@ -158,7 +152,7 @@ d CURLAUTH_BASIC c X'00000001' d CURLAUTH_DIGEST... d c X'00000002' - d CURLAUTH_NEGOTIATE... + d CURLAUTH_GSSNEGOTIATE... d c X'00000004' d CURLAUTH_NTLM c X'00000008' d CURLAUTH_DIGEST_IE... @@ -368,7 +362,8 @@ d c 14 d CURLE_FTP_CANT_GET_HOST... d c 15 - d CURLE_HTTP2 c 16 + d CURLE_OBSOLETE16... + d c 16 d CURLE_FTP_COULDNT_SET_TYPE... d c 17 d CURLE_PARTIAL_FILE... @@ -515,8 +510,6 @@ d c 88 d CURLE_NO_CONNECTION_AVAILABLE... d c 89 - d CURLE_SSL_PINNEDPUBKEYNOTMATCH... - d c 90 * /if not defined(CURL_NO_OLDIES) d CURLE_URL_MALFORMAT_USER... @@ -781,10 +774,6 @@ d c X'01000000' d CURLPROTO_GOPHER... d c X'02000000' - d CURLPROTO_SMB... - d c X'04000000' - d CURLPROTO_SMBS... - d c X'08000000' * d CURLoption s 10i 0 based(######ptr######) Enum d CURLOPT_WRITEDATA... @@ -1199,10 +1188,6 @@ d c 10228 d CURLOPT_HEADEROPT... d c 00229 - d CURLOPT_PINNEDPUBLICKEY... - d c 10230 - d CURLOPT_UNIX_SOCKET_PATH... - d c 10231 * /if not defined(CURL_NO_OLDIES) d CURLOPT_FILE c 10001 @@ -1395,7 +1380,7 @@ d c 2 d CURLSSLBACKEND_NSS... d c 3 - d CURLSSLBACKEND_OBSOLETE4... + d CURLSSLBACKEND_QSOSSL... d c 4 d CURLSSLBACKEND_GSKIT... d c 5 diff --git a/packages/OS400/make-lib.sh b/packages/OS400/make-lib.sh index a4e5059..ec9e2f0 100644 --- a/packages/OS400/make-lib.sh +++ b/packages/OS400/make-lib.sh @@ -7,20 +7,13 @@ SCRIPTDIR=`dirname "${0}"` . "${SCRIPTDIR}/initscript.sh" cd "${TOPDIR}/lib" -# Need to have IFS access to the mih/cipher header file. - -if action_needed cipher.mih '/QSYS.LIB/QSYSINC.LIB/MIH.FILE/CIPHER.MBR' -then rm -f cipher.mih - ln -s '/QSYS.LIB/QSYSINC.LIB/MIH.FILE/CIPHER.MBR' cipher.mih -fi - # Create and compile the identification source file. echo '#pragma comment(user, "libcurl version '"${LIBCURL_VERSION}"'")' > os400.c echo '#pragma comment(user, __DATE__)' >> os400.c echo '#pragma comment(user, __TIME__)' >> os400.c -echo '#pragma comment(copyright, "Copyright (C) 1998-2014 Daniel Stenberg et al. OS/400 version by P. Monnerat")' >> os400.c +echo '#pragma comment(copyright, "Copyright (C) 1998-2013 Daniel Stenberg et al. OS/400 version by P. Monnerat")' >> os400.c make_module OS400 os400.c LINK= # No need to rebuild service program yet. MODULES= @@ -168,7 +161,7 @@ then MODULES= # formdata.c. However, there are some unsatisfied # external references leading in the following # modules to be (recursively) needed. - MODULES="${MODULES} EASY STRDUP SSLGEN GSKIT HOSTIP HOSTIP4 HOSTIP6" + MODULES="${MODULES} EASY STRDUP SSLGEN QSSL HOSTIP HOSTIP4 HOSTIP6" MODULES="${MODULES} URL HASH TRANSFER GETINFO COOKIE SENDF SELECT" MODULES="${MODULES} INET_NTOP SHARE HOSTTHRE MULTI LLIST FTP HTTP" MODULES="${MODULES} HTTP_DIGES HTTP_CHUNK HTTP_NEGOT TIMEVAL HOSTSYN" diff --git a/packages/OS400/os400sys.c b/packages/OS400/os400sys.c index caeaa95..fd3cf6e 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 - 2013, Daniel Stenberg, , 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,10 @@ #include #endif +#ifdef USE_QSOSSL +#include +#endif + #ifdef USE_GSKIT #include #include @@ -94,9 +98,11 @@ static void thdbufdestroy(void * private) { + localkey_t i; + buffer_t * p; + if(private) { - buffer_t * p = (buffer_t *) private; - localkey_t i; + p = (buffer_t *) private; for(i = (localkey_t) 0; i < LK_LAST; i++) { if(p->buf) @@ -364,6 +370,102 @@ Curl_getaddrinfo_a(const char * nodename, const char * servname, } +#ifdef USE_QSOSSL + +/* ASCII wrappers for the SSL procedures. */ + +int +Curl_SSL_Init_Application_a(SSLInitApp * init_app) + +{ + int rc; + unsigned int i; + SSLInitApp ia; + + if(!init_app || !init_app->applicationID || !init_app->applicationIDLen) + return SSL_Init_Application(init_app); + + memcpy((char *) &ia, (char *) init_app, sizeof ia); + i = ia.applicationIDLen; + + if(!(ia.applicationID = malloc(i + 1))) { + errno = ENOMEM; + return SSL_ERROR_IO; + } + + QadrtConvertA2E(ia.applicationID, init_app->applicationID, i, i); + ia.applicationID[i] = '\0'; + rc = SSL_Init_Application(&ia); + free(ia.applicationID); + init_app->localCertificateLen = ia.localCertificateLen; + init_app->sessionType = ia.sessionType; + return rc; +} + + +int +Curl_SSL_Init_a(SSLInit * init) + +{ + int rc; + unsigned int i; + SSLInit ia; + + if(!init || (!init->keyringFileName && !init->keyringPassword)) + return SSL_Init(init); + + memcpy((char *) &ia, (char *) init, sizeof ia); + + if(ia.keyringFileName) { + i = strlen(ia.keyringFileName); + + if(!(ia.keyringFileName = malloc(i + 1))) { + errno = ENOMEM; + return SSL_ERROR_IO; + } + + QadrtConvertA2E(ia.keyringFileName, init->keyringFileName, i, i); + ia.keyringFileName[i] = '\0'; + } + + if(ia.keyringPassword) { + i = strlen(ia.keyringPassword); + + if(!(ia.keyringPassword = malloc(i + 1))) { + if(ia.keyringFileName) + free(ia.keyringFileName); + + errno = ENOMEM; + return SSL_ERROR_IO; + } + + QadrtConvertA2E(ia.keyringPassword, init->keyringPassword, i, i); + ia.keyringPassword[i] = '\0'; + } + + rc = SSL_Init(&ia); + + if(ia.keyringFileName) + free(ia.keyringFileName); + + if(ia.keyringPassword) + free(ia.keyringPassword); + + return rc; +} + + +char * +Curl_SSL_Strerror_a(int sslreturnvalue, SSLErrorMsg * serrmsgp) + +{ + return set_thread_string(LK_SSL_ERROR, + SSL_Strerror(sslreturnvalue, serrmsgp)); +} + +#endif /* USE_QSOSSL */ + + #ifdef USE_GSKIT /* ASCII wrappers for the GSKit procedures. */ @@ -1093,13 +1195,14 @@ struct berval * * Curl_ldap_get_values_len_a(void * ld, LDAPMessage * entry, const char * attr) { + int i; char * cp; struct berval * * result; cp = (char *) NULL; if(attr) { - int i = strlen(attr); + i = strlen(attr); if(!(cp = malloc(i + 1))) { ldap_set_lderrno(ld, LDAP_NO_MEMORY, NULL, diff --git a/packages/Symbian/group/libcurl.mmp b/packages/Symbian/group/libcurl.mmp index 2419c20..5d7410a 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 rawstr.c curl_addrinfo.c socks_gssapi.c \ + ssh.c vtls/nss.c vtls/qssl.c rawstr.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,8 +39,7 @@ SOURCE \ http_proxy.c non-ascii.c asyn-ares.c asyn-thread.c curl_gssapi.c \ curl_ntlm.c curl_ntlm_wb.c curl_ntlm_core.c curl_ntlm_msgs.c \ curl_sasl.c vtls/curl_schannel.c curl_multibyte.c \ - vtls/curl_darwinssl.c bundles.c conncache.c curl_sasl_sspi.c smb.c \ - curl_sasl_gssapi.c curl_endian.c + vtls/curl_darwinssl.c bundles.c conncache.c curl_sasl_sspi.c USERINCLUDE ../../../lib ../../../include/curl #ifdef ENABLE_SSL diff --git a/packages/vms/backup_gnv_curl_src.com b/packages/vms/backup_gnv_curl_src.com index 3857571..9a7905b 100644 --- a/packages/vms/backup_gnv_curl_src.com +++ b/packages/vms/backup_gnv_curl_src.com @@ -52,19 +52,19 @@ $! $ kit_name = f$trnlnm("GNV_PCSI_KITNAME") $ if kit_name .eqs. "" $ then -$ write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run." +$ write sys$output "@MAKE_PCSI_BASH_KIT_NAME.COM has not been run." $ goto all_exit $ endif $ producer = f$trnlnm("GNV_PCSI_PRODUCER") $ if producer .eqs. "" $ then -$ write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run." +$ write sys$output "@MAKE_PCSI_BASH_KIT_NAME.COM has not been run." $ goto all_exit $ endif $ filename_base = f$trnlnm("GNV_PCSI_FILENAME_BASE") $ if filename_base .eqs. "" $ then -$ write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run." +$ write sys$output "@MAKE_PCSI_BASH_KIT_NAME.COM has not been run." $ goto all_exit $ endif $! diff --git a/packages/vms/build_curl-config_script.com b/packages/vms/build_curl-config_script.com index ea1881d..ae9d181 100644 --- a/packages/vms/build_curl-config_script.com +++ b/packages/vms/build_curl-config_script.com @@ -1,8 +1,10 @@ -$! build_curl-config_script.com +$! File: build_libcurl_pc.com $! -$! This generates the curl-config. script from the curl-config.in file. +$! $Id:$ $! -$! Copyright 2014, John Malmberg +$! Build the curl-config file from the config_curl.in file +$! +$! Copyright 2013, John Malmberg $! $! Permission to use, copy, modify, and/or distribute this software for any $! purpose with or without fee is hereby granted, provided that the above @@ -17,13 +19,44 @@ $! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT $! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. $! $! -$! 16-Dec-2014 J. Malmberg +$! 15-Jun-2013 J. Malmberg $! $!=========================================================================== $! $! Skip this if the curl-config. already exists. $ if f$search("[--]curl-config.") .nes. "" then goto all_exit $! +$! Need to know the kit type. +$ kit_name = f$trnlnm("GNV_PCSI_KITNAME") +$ if kit_name .eqs. "" +$ then +$ write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run." +$ goto all_exit +$ endif +$! +$! +$! Parse the kit name into components. +$!--------------------------------------- +$ producer = f$element(0, "-", kit_name) +$ base = f$element(1, "-", kit_name) +$ product = f$element(2, "-", kit_name) +$ mmversion = f$element(3, "-", kit_name) +$ majorver = f$extract(0, 3, mmversion) +$ minorver = f$extract(3, 2, mmversion) +$ updatepatch = f$element(4, "-", kit_name) +$ if updatepatch .eqs. "-" then updatepatch = "" +$! +$! kit type of "D" means a daily build +$ kit_type = f$edit(f$extract(0, 1, majorver), "upcase") +$! +$ cfg_file_in = "[--]curl-config.in" +$! +$ if f$search(cfg_file_in) .eqs. "" +$ then +$ write sys$output "Can not find curl-config.in." +$ goto all_exit +$ endif +$! $ if (f$getsyi("HW_MODEL") .lt. 1024) $ then $ arch_name = "VAX" @@ -33,122 +66,223 @@ $ arch_name = arch_name + f$edit(f$getsyi("ARCH_NAME"), "UPCASE") $ if (arch_name .eqs. "") then arch_name = "UNK" $ endif $! -$ x_prefix = "/usr" -$ x_exec_prefix = "/usr" -$ x_includedir = "${prefix}/include" -$ x_cppflag_curl_staticlib = "-DCURL_STATICLIB" -$ x_enabled_shared = "no" -$ x_curl_ca_bundle = "" -$ x_cc = "cc" -$ x_support_features = "SSL IPv6 libz NTLM" -$ x_support_protocols1 = "DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS LDAP" -$ x_support_protocols2 = " LDAPS POP3 POP3S RTSP SMTP SMTPS TELNET TFTP" -$ x_support_protocols = x_support_protocols1 + x_support_protocols2 -$ x_curlversion = "0.0.0.0" -$ x_versionnum = "" -$ x_libdir = "${prefix}/lib" -$ x_require_lib_deps = "" -$ x_enable_static = "" -$ x_ldflags = "" -$ part1 = "-L/usr/lib -L/SSL_LIB -lssl -lcrypto -lz" -$ if arch_name .eqs. "VAX" -$ then -$ x_libcurl_libs = part1 -$ else -$ x_libcurl_libs = part1 + " -lgssapi" -$ endif -$ x_libext = "a" $! -$! Get the version number -$!----------------------- -$ i = 0 -$ open/read/error=version_loop_end vhf [--.include.curl]curlver.h -$ version_loop: -$ read/end=version_loop_end vhf line_in +$ curl_version = "0.0.0" +$ open/read vf [--.include.curl]curlver.h +$version_loop: +$ read vf/end=version_loop_end line_in $ if line_in .eqs. "" then goto version_loop -$ if f$locate("#define LIBCURL_VERSION ", line_in) .eq. 0 +$ key = f$element(0, " ", line_in) +$ if key .nes. "#define" then goto version_loop +$ name = f$element(1, " ", line_in) +$ if name .eqs. "LIBCURL_VERSION" $ then -$ x_curlversion = f$element(2," ", line_in) - """" - """" -$ i = i + 1 +$ curl_version = f$element(2, " ", line_in) - """" - """" +$ goto version_loop $ endif -$ if f$locate("#define LIBCURL_VERSION_NUM ", line_in) .eq. 0 +$ if name .eqs. "LIBCURL_VERSION_NUM" $ then -$ x_versionnum = f$element(2," ", line_in) - """" - """" -$ i = i + 1 +$ version_num_hex = f$element(2, " ", line_in) +$ version_num = version_num_hex - "0x" +$ goto version_loop $ endif -$ if i .lt 2 then goto version_loop -$ version_loop_end: -$ close vhf +$version_loop_end: +$ close vf $! -$ kit_type = "V" -$ if f$locate("-", x_curlversion) .lt. f$length(x_curlversion) +$! +$ create [--]curl-config. +$ open/append pco [--]curl-config. +$ open/read pci 'cfg_file_in' +$cfg_file_loop: +$ read pci/end=cfg_file_loop_end line_in +$! +$! blank lines +$ if line_in .eqs. "" $ then -$ kit_type = "D" -$ x_prefix = "/beta" -$ x_exec_prefix = "/beta" +$ write pco "" +$ goto cfg_file_loop $ endif $! -$ if kit_type .nes. "D" +$! comment lines +$ key = f$extract(0, 1, line_in) +$ if key .eqs. "#" $ then -$ part1 = " echo "" '--prefix=/usr' '--exec-prefix=/usr' " -$ else -$ part1 = " echo "" '--prefix=/beta' '--exec_prefix=/beta' " +$ write pco line_in +$ goto cfg_file_loop $ endif -$ if arch_name .eqs. "VAX" +$! +$! No substitution line +$ line_in_len = f$length(line_in) +$ if f$locate("@", line_in) .ge. line_in_len $ then -$ part3 = "" -$ else -$ part3 = "'--with-gssapi' " +$ write pco line_in +$ goto cfg_file_loop +$ endif +$! +$ if f$locate("@prefix@", line_in) .lt line_in_len +$ then +$ if kit_type .nes. "D" +$ then +$ write pco "prefix=/usr" +$ else +$ write pco "prefix=/beta" +$ endif +$ goto cfg_file_loop +$ endif +$ if f$locate("@exec_prefix@", line_in) .lt line_in_len +$ then +$ if kit_type .nes. "D" +$ then +$ write pco "exec_prefix=/usr" +$ else +$ write pco "exec_prefix=/beta" +$ endif +$ goto cfg_file_loop +$ endif +$ if f$locate("=@includedir@", line_in) .lt line_in_len +$ then +$ write pco "includedir=$(prefix}/include" +$ goto cfg_file_loop +$ endif +$ if f$locate("X@includedir@", line_in) .lt line_in_len +$ then +$ write pco " if test ""X$(prefix}/include""; then" +$ goto cfg_file_loop +$ endif +$ if f$locate("I@includedir@", line_in) .lt line_in_len +$ then +$ write pco " echo "${CPPFLAG_CURL_STATICLIB}-I$(prefix}/include" +$ goto cfg_file_loop +$ endif +$ if f$locate("@CPPFLAG_CURL_STATICLIB@", line_in) .lt line_in_len +$ then +$ write pco "cppflag_curl_staticlib=-DCURL_STATICLIB" +$ goto cfg_file_loop +$ endif +$ if f$locate("@ENABLE_SHARED@", line_in) .lt line_in_len +$ then +$ write pco " echo no" +$ goto cfg_file_loop $ endif -$ part2 = "'--disable-dependency-tracking' '--disable-libtool-lock' " -$ part4 = "'--disable-ntlm-wb' '--with-ca-path=gnv$curl_ca_path'""" +$ if f$locate("@CURL_CA_BUNDLE@", line_in) .lt line_in_len +$ then +$ write pco " echo """"" +$ goto cfg_file_loop +$ endif +$ if f$locate("@CC@", line_in) .lt line_in_len +$ then +$ write pco " echo ""cc""" +$ goto cfg_file_loop +$ endif +$ if f$locate("@SUPPORT_FEATURES@", line_in) .lt line_in_len +$ then +$ if arch_name .eqs. "VAX" +$ then +$ write pco " for feature in SSL libz NTLM ""; do" +$ else +$ write pco " for feature in SSL IPv6 libz NTLM ""; do" +$ endif +$ goto cfg_file_loop +$ endif +$ if f$locate("@SUPPORT_PROTOCOLS@", line_in) .lt line_in_len +$ then +$ proto1 = "DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS" +$ proto2 = " LDAP LDAPS POP3 POP3S RTSP SMTP SMTPS TELNET TFTP" +$ proto = proto1 + proto2 +$ write pco " for protocol in " + proto + "; do" +$ goto cfg_file_loop +$ endif +$ if f$locate("libcurl @CURLVERSION@", line_in) .lt line_in_len +$ then +$ write pco " echo libcurl ''curl_version'" +$ goto cfg_file_loop +$ endif +$ if f$locate("existing @CURLVERSION@", line_in) .lt line_in_len +$ then +$ line_start = - + " echo ""requested version $checkfor is newer than existing" +$ write pco "''line_start' ''curl_version'""" +$ goto cfg_file_loop +$ endif +$ if f$locate("`echo @versionnum@", line_in) .lt line_in_len +$ then +$ write pco " numuppercase=`echo ''version_num' | tr 'a-f' 'A-F'`" +$ goto cfg_file_loop +$ endif +$ if f$locate(" echo @versionnum@", line_in) .lt line_in_len +$ then +$ write pco " echo ''version_num'" +$ goto cfg_file_loop +$ endif +$ if f$locate("X@libdir@", line_in) .lt line_in_len +$ then +$ part1 = " if test ""$(exec_prefix}/lib"" != ""X/usr/lib""" +$ part2 = "-a ""X$(exec_prefix}/lib"" != ""X/usr/lib64""; then" +$ write pco part1,part2 +$ goto cfg_file_loop +$ endif +$ if f$locate("L@libdir@", line_in) .lt line_in_len +$ then +$ write pco " CURLLIBDIR=""$(exec_prefix}/lib """ +$ goto cfg_file_loop +$ endif +$ if f$locate("@REQUIRE_LIB_DEPS@", line_in) .lt line_in_len +$ then +$ write pco " if test "Xyes" = "Xyes"; then" +$ goto cfg_file_loop +$ endif +$ if f$locate("@LIBCURL_LIBS@", line_in) .lt line_in_len +$ then +$ if arch_name .eqs. "VAX" +$ then +$ write pco " echo ${CURLLIBDIR}-lssl -lcrypto -lz" +$ else +$ write pco " echo ${CURLLIBDIR}-lssl -lcrypto -lgssapi -lz" +$ endif +$ goto cfg_file_loop +$ endif +$ if f$locate("@ENABLE_STATIC@", line_in) .lt line_in_len +$ then +$ write pco " if test "Xyes" != "Xno" ; then" +$ goto cfg_file_loop +$ endif +$ if f$locate("@LIBCURL_LIBS@", line_in) .lt line_in_len +$ then +$ part1 = " echo ${exec_prefix}/lib/libcurl.a" +$ part2 = "-L/usr/lib -L/SSL_LIB" +$ if arch_name .eqs. "VAX" +$ then +$ write pco "''part1' ''part2' -lssl -lcrypto -lz" +$ else +$ write pco "''part1' ''part2' -lssl -lcrypto -lgssapi -lz" +$ endif +$ goto cfg_file_loop +$ endif +$ if f$locate("@CONFIGURE_OPTIONS@", line_in) .lt line_in_len +$ then +$ if kit_type .nes. "D" +$ then +$ part1 = " echo "" '--prefix=/usr' '--exec-prefix=/usr' " +$ else +$ part1 = " echo "" '--prefix=/beta' '--exec_prefix=/beta' " +$ endif +$ if arch_name .eqs. "VAX" +$ then +$ part3 = "" +$ else +$ part3 = "'--with-gssapi' " +$ endif +$ part2 = "'--disable-dependency-tracking' '--disable-libtool-lock' " +$ part4 = "'--disable-ntlm-wb' '--with-ca-path=gnv$curl_ca_path'""" $! -$ x_configure_options = part1 + part2 + part3 + part4 +$ write pco part1,part2,part3,part4 $! +$ goto cfg_file_loop +$ endif $! -$ open/read/error=read_loop_end c_c_in sys$disk:[--]curl-config.in -$ create sys$disk:[--]curl-config. -$ open/append c_c_out sys$disk:[--]curl-config. -$read_loop: -$ read/end=read_loop_end c_c_in line_in -$ line_in_len = f$length(line_in) -$ if f$locate("@", line_in) .ge. line_in_len -$ then -$ write c_c_out line_in -$ goto read_loop -$ endif -$ i = 0 -$ line_out = "" -$sub_loop: -$ ! Replace between pairs of @ by alternating the elements. -$ ! If mis-matched pairs, do not substitute anything. -$ section1 = f$element(i, "@", line_in) -$ if section1 .eqs. "@" -$ then -$ goto sub_loop_end -$ endif -$ i = i + 1 -$ section2 = f$element(i, "@", line_in) -$ if section2 .eqs. "@" -$ then -$ goto sub_loop_end -$ endif -$ i = i + 1 -$ section3 = f$element(i, "@", line_in) -$ if section3 .eqs. "@" -$ then -$ if line_out .eqs. "" then line_out = line_in -$ goto sub_loop_end -$ endif -$ line_out = line_out + section1 -$ if f$type(x_'section2') .eqs. "STRING" -$ then -$ line_out = line_out + x_'section2' -$ endif -$ goto sub_loop -$sub_loop_end: -$ write c_c_out line_out -$ goto read_loop -$read_loop_end: -$ close c_c_in -$ close c_c_out +$pc_file_loop_end: +$ close pco +$ close pci +$! +$all_exit: +$ exit diff --git a/packages/vms/build_libcurl_pc.com b/packages/vms/build_libcurl_pc.com index 97e6ae6..251b345 100644 --- a/packages/vms/build_libcurl_pc.com +++ b/packages/vms/build_libcurl_pc.com @@ -76,7 +76,7 @@ $ endif $! $! $ curl_version = "0.0.0" -$ open/read vf [--.src]tool_version.h +$ open/read vf [--.src]version.h $version_loop: $ read vf/end=version_loop_end line_in $ if line_in .eqs. "" then goto version_loop diff --git a/packages/vms/build_vms.com b/packages/vms/build_vms.com index d7edc46..97c305d 100644 --- a/packages/vms/build_vms.com +++ b/packages/vms/build_vms.com @@ -148,9 +148,6 @@ $! * 3 spaces after $ for second level. Line start + 4. $! * 7 spaces after $ for third level. Line start + 8. $! * Each level after that indents 4 characters. $! * then/else/endif same indentation as if statement. -$! 17-Nov-2014, Michael Steve -$! Modified build to handle new location of the VTLS lib -$! source within zip archive. Not a pretty fix. $! $!=========================================================================== $! @@ -680,6 +677,8 @@ $! Form CC qualifiers. $! $ cc_defs = "/define = (''cc_defs')" $ cc_qual2 = cc_qual2 + " /object = ''objdir'" +$ cc_qual2 = cc_qual2 + " /include = ([-.lib], [-.src]," +$ cc_qual2 = cc_qual2 + " [-.packages.vms], [-.packages.vms.''arch_name'])" $ cc_qual2 = cc_qual2 + "/nested_include_directory=none" $! $ 'vo_c' "CC opts:", - @@ -807,6 +806,7 @@ $! set nover $ endif $! $! +$! $ on control_y then goto Common_Exit $! $ set default 'proc_dev_dir' @@ -819,21 +819,10 @@ $ if curl_sys_zlibinc .nes. "" $ then $ sys_inc = sys_inc + ",''curl_sys_zlibinc'" $ endif -$! Build LIB -$ cc_include = "/include=([-.lib],[-.lib.vtls],[-.packages.vms]" -$ cc_include = cc_include + ",[-.packages.vms.''arch_name'])" $ call build "[--.lib]" "*.c" "''objdir'CURLLIB.OLB" "amigaos, nwlib, nwos" $ if ($status .eq. ctrl_y) then goto Common_Exit -$! Build VTLS -$ cc_include = "/include=([--.lib.vtls],[--.lib],[--.src]" -$ cc_include = cc_include + ",[--.packages.vms],[--.packages.vms.''arch_name'])" -$ call build "[--.lib.vtls]" "*.c" "''objdir'CURLLIB.OLB" "amigaos, nwlib, nwos" -$! Build SRC -$ cc_include = "/include=([-.src],[-.lib],[-.lib.vtls]" -$ cc_include = cc_include + ",[-.packages.vms],[-.packages.vms.''arch_name'])" $ call build "[--.src]" "*.c" "''objdir'CURLSRC.OLB" $ if ($status .eq. ctrl_y) then goto Common_Exit -$! Build MSG $ call build "[]" "*.msg" "''objdir'CURLSRC.OLB" $ if ($status .eq. ctrl_y) then goto Common_Exit $! @@ -931,7 +920,7 @@ $ on control_y then goto EndLoop ! SS$_CONTROLY $ sts = 1 ! SS$_NORMAL. $! set noon $ set default 'p1' -$ search = "sys$disk:" + p2 +$ search = p2 $ reset = f$search("reset") $ if f$search( p3) .eqs. "" $ then @@ -1005,7 +994,6 @@ $ define/user decc$system_include 'sys_inc' $ CC 'cc_defs' - 'cc_qual1' - 'cc_qual2' - - 'cc_include' - 'file' $ else $ cmd_msg = "MESSAGE " + msg_qual diff --git a/packages/vms/config_h.com b/packages/vms/config_h.com index 2a5503f..6ec27ea 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 compatability routines $!--------------------------------------------- $ if severity .ne. 1 $ then diff --git a/packages/vms/curl_crtl_init.c b/packages/vms/curl_crtl_init.c index 01a34e5..98c70ec 100644 --- a/packages/vms/curl_crtl_init.c +++ b/packages/vms/curl_crtl_init.c @@ -232,7 +232,7 @@ static void set_features(void) /* POSIX requires that open files be able to be removed */ set_feature_default ("DECC$ALLOW_REMOVE_OPEN_FILES", ENABLE); - /* Default to outputting Unix filenames in VMS routines */ + /* Default to outputting UNIX filesnames in VMS routines */ set_feature_default ("DECC$FILENAME_UNIX_ONLY", ENABLE); /* FILENAME_UNIX_ONLY Implicitly sets */ /* decc$disable_to_vms_logname_translation */ @@ -248,7 +248,7 @@ static void set_features(void) set_feature_default("DECC$FILENAME_UNIX_REPORT", ENABLE); } - /* When reporting Unix filenames, glob the same way */ + /* When reporting UNIX filenames, glob the same way */ set_feature_default ("DECC$GLOB_UNIX_STYLE", ENABLE); /* The VMS version numbers on Unix filenames is incompatible with most */ diff --git a/packages/vms/curl_gnv_build_steps.txt b/packages/vms/curl_gnv_build_steps.txt index 6a87fef..e21b37d 100644 --- a/packages/vms/curl_gnv_build_steps.txt +++ b/packages/vms/curl_gnv_build_steps.txt @@ -58,7 +58,7 @@ LCL_ROOT:,VMS_ROOT:,SRC_ROOT: For the make install process to work, it must have write access to the directories referenced by the GNU: logical name. -In future releases of GNV, and with GNV Bash 4.3.30 installed, this name +In future releases of GNV, and with GNV Bash 4.2.45 installed, this name should be GNV$GNU: As directly updating those directories would probably be disruptive to other @@ -99,6 +99,10 @@ Note to builders: GNV currently has a bug where configure scripts take a long time to run. Some of the configure steps take a while to complete, and on a 600 Mhz DS10 with IDE disks, taking an hour to run the CURL configure is normal. +The bug appears to be in the SED for GNV 2.1.3 and GNV 3.0.1 where it +is taking far longer than it should to do I/O. In addition, there are +reports that the SED in GNV 3.0.1 is broken so the SED from GNV 2.1.3 +should be used instead. The following messages can be ignored and may get fixed in a future version of GNV. The GNV$*.OPT files are used to find the libraries as many have @@ -115,50 +119,12 @@ u unimplemented switch - ignored With these search lists set up and the properly, curl can be built by -setting your default to PRJ_ROOT:[curl.packages.vms] and then issuing -either the command: - - $ @pcsi_product_gnv_curl.com - -or +setting your default to PRJ_ROOT:[curl.packages.vms] where the * is +replaced by the actual version of curl, and then issuing the command: $ @build_gnv_curl.com. -The GNV configure procedure takes considerably longer than the DCL build -procecure takes. It is of use for testing the GNV build environment, and -may not have been kept up to date. - -The pcsi_product_gnv_curl.com needs the following logical names which -are described in the section below: - - gnv_pcsi_producer - gnv_pcsi_producer_full_name - stage_root - vms_root1 (Optional if vms_root is on a NFS volume) - src_root1 (Optional if src_root is on a NFS volume) - -The pcsi_product_gnv_curl.com is described in more detail below. It does -the following steps. The build steps are only done if they are needed to -allow using either DCL or GNV based building procedures. - - $ @build_vms list - - $ @gnv_link_curl.com - - $ @build_gnv_curl_release_notes.com - - $ @backup_gnv_curl_src.com - - $ @build_gnv_curl_pcsi_desc.com - - $ @build_gnv_curl_pcsi_text.com - - $ @stage_curl_install remove - $ @stage_curl_install - - Then builds the kit. - -The build_gnv_curl.com command procedure does the following: +This command procedure does the following: $ @setup_gnv_curl_build.com @@ -174,8 +140,7 @@ The build_gnv_curl.com command procedure does the following: $ purge new_gnu:[*...]/log -To clean up after a GNV based build to start over, the following commands are -used: +To clean up after a build to start over, the following commands are used: $ bash bash$ cd ../.. diff --git a/packages/vms/generate_config_vms_h_curl.com b/packages/vms/generate_config_vms_h_curl.com index 90a83d5..8024a92 100644 --- a/packages/vms/generate_config_vms_h_curl.com +++ b/packages/vms/generate_config_vms_h_curl.com @@ -277,18 +277,6 @@ $endif $write cvh "#ifdef CURL_DISABLE_LIBCURL_OPTION" $write cvh "#undef CURL_DISABLE_LIBCURL_OPTION" $write cvh "#endif" -$write cvh "#ifndef __VAX" -$write cvh "#ifdef CURL_DISABLE_NTLM" -$write cvh "#undef CURL_DISABLE_NTLM" -$write cvh "#endif" -$write cvh "#else" -$! NTLM needs long long or int64 support, missing from DECC C. -$write cvh "#ifdef __DECC -$write cvh "#ifndef CURL_DISABLE_NTLM" -$write cvh "#define CURL_DISABLE_NTLM 1" -$write cvh "#endif" -$write cvh "#endif" -$write cvh "#endif" $write cvh "#ifdef CURL_DISABLE_POP3" $write cvh "#undef CURL_DISABLE_POP3" $write cvh "#endif" @@ -346,9 +334,6 @@ $write cvh "#endif" $write cvh "#ifdef USE_MANUAL" $write cvh "#undef USE_MANUAL" $write cvh "#endif" -$write cvh "#ifdef USE_NGHTTP2" -$write cvh "#undef USE_NGHTTP2" -$write cvh "#endif" $write cvh "#ifdef USE_NSS" $write cvh "#undef USE_NSS" $write cvh "#endif" @@ -367,17 +352,10 @@ $write cvh "#endif" $write cvh "#ifdef USE_TLS_SRP" $write cvh "#undef USE_TLS_SRP" $write cvh "#endif" -$write cvh "#ifdef USE_UNIX_SOCKETS" -$write cvh "#undef USE_UNIX_SOCKETS" -$write cvh "#endif" $write cvh "#ifdef USE_WINDOWS_SSPI" $write cvh "#undef USE_WINDOWS_SSPI" $write cvh "#endif" $! -$write cvh "#ifndef HAVE_OLD_GSSMIT" -$write cvh "#define gss_nt_service_name GSS_C_NT_HOSTBASED_SERVICE" -$write cvh "#endif" -$! $! $! Note: $! The CURL_EXTERN_SYMBOL is used for platforms that need the compiler @@ -410,18 +388,6 @@ $ write cvh "#endif" $ write cvh "#ifndef USE_SSLEAY" $ write cvh "#define USE_SSLEAY 1" $ write cvh "#endif" -$ if arch_name .eqs. "VAX" -$ then -$ old_mes = f$enviroment("message") -$ set message/notext/nofaci/noseve/noident -$ search/output=nla0: ssl$include:*.h CONF_MFLAGS_IGNORE_MISSING_FILE -$ status = $severity -$ set message'old_mes' -$ if status .nes. "1" -$ then -$ write cvh "#define VMS_OLD_SSL 1" -$ endif -$ endif $endif $! $! @@ -440,7 +406,6 @@ $ write cvh "#undef HAVE_LIBIDN" $ write cvh "#endif" $endif $! -$! $! LibSSH2 not ported to VMS at this time. $! Allow explicit experimentation. $if libssh2 @@ -463,7 +428,6 @@ $ write cvh "#endif" $endif $! $! -$! $if .not. nozlib $then $ write cvh "#define HAVE_LIBZ 1" @@ -471,9 +435,6 @@ $ write cvh "#define HAVE_ZLIB_H 1" $endif $! $! -$! Suppress a message in curl_gssapi.c compile. -$write cvh "#pragma message disable notconstqual" -$! $! Close out the file $! $write cvh "" diff --git a/packages/vms/gnv_curl_configure.sh b/packages/vms/gnv_curl_configure.sh index 2eeb209..f714210 100644 --- a/packages/vms/gnv_curl_configure.sh +++ b/packages/vms/gnv_curl_configure.sh @@ -23,7 +23,7 @@ # 28-Dec-2012 J. Malmberg Update for Bash 4.2.39 #========================================================================== # -# POSIX exit mode is needed for Unix shells. +# POSIX exit mode is needed for UNIX shells. export GNV_CC_MAIN_POSIX_EXIT=1 # # Where to look for the helper files. diff --git a/packages/vms/gnv_link_curl.com b/packages/vms/gnv_link_curl.com index 960c243..fadbbcc 100644 --- a/packages/vms/gnv_link_curl.com +++ b/packages/vms/gnv_link_curl.com @@ -354,6 +354,7 @@ $ endif $! $gnv_libcurl_share = "''default_dir'gnv$libcurl.exe" $! +$set ver $ if f$search(gnv_libcurl_share) .eqs. "" $ then $ if arch_name .nes. "VAX" @@ -419,17 +420,19 @@ $ curl_dsf = "[.src]curl.dsf" $ curl_main = "[.packages.vms.''arch_name']tool_main.obj" $ curl_src = "[.packages.vms.''arch_name']curlsrc.olb" $ curl_lib = "[.packages.vms.''arch_name']curllib.olb" +$ strtoofft = "strtoofft" +$ strdup = "strdup" $ rawstr = "rawstr" $ nonblock = "nonblock" -$ warnless = "warnless" $! $! Extended parse style requires special quoting $! $ if (arch_name .nes. "VAX") .and. (parse_style .eqs. "EXTENDED") $ then +$ strtoofft = """strtoofft""" +$ strdup = """strdup""" $ rawstr = """rawstr""" $ nonblock = """nonblock""" -$ warnless = """warnless""" $ endif $ if f$search(curl_exe) .eqs. "" $ then @@ -437,7 +440,7 @@ $ define/user gnv$libcurl 'gnv_libcurl_share' $ link'ldebug'/exe='curl_exe'/dsf='curl_dsf' - 'curl_main','curl_src'/lib, - 'curl_lib'/library/include=- - ('rawstr','nonblock','warnless'),- + ('strtoofft', 'strdup', 'rawstr', 'nonblock'),- gnv_packages_vms:curlmsg.obj,- sys$input:/opt gnv$libcurl/share @@ -445,7 +448,7 @@ gnv_packages_vms:curl_crtl_init.obj $ endif $ endif $! -$! +$set nover $! $! in6addr_missing so skip building: $! [.server]sws.o diff --git a/packages/vms/make_gnv_curl_install.sh b/packages/vms/make_gnv_curl_install.sh index 5099fe4..d2150e6 100644 --- a/packages/vms/make_gnv_curl_install.sh +++ b/packages/vms/make_gnv_curl_install.sh @@ -33,7 +33,7 @@ export GNV_CXX_QUALIFIERS=/DEBUG/OPTIMIZE/float=ieee/ieee_mode=denorm_results export GNV_CC_NO_INC_PRIMARY=1 # # -# POSIX exit mode is needed for Unix shells. +# POSIX exit mode is needed for UNIX shells. export GNV_CC_MAIN_POSIX_EXIT=1 make cd ../.. diff --git a/packages/vms/pcsi_product_gnv_curl.com b/packages/vms/pcsi_product_gnv_curl.com index 747cbd6..38a1a99 100644 --- a/packages/vms/pcsi_product_gnv_curl.com +++ b/packages/vms/pcsi_product_gnv_curl.com @@ -61,32 +61,6 @@ $! Make sure that the kit name is up to date for this build $!---------------------------------------------------------- $ @MAKE_PCSI_CURL_KIT_NAME.COM $! -$! -$! Make sure that the image is built -$!---------------------------------- -$ arch_name = f$edit(f$getsyi("arch_name"),"UPCASE") -$ if f$search("[--.src]curl.exe") .eqs. "" -$ then -$ build_it = 1 -$ libfile = "[.packages.vms.''arch_name']curllib.olb" -$ if f$search(libfile) .nes. "" -$ then -$ build_it = 0 -$ else -$ ! GNV based build -$ libfile = "[.lib.^.libs]libcurl.a" -$ if f$search(libfile) .nes. "" -$ then -$ build_it = 0; -$ endif -$ endif -$ if build_it .eq. 1 -$ then -$ @build_vms list -$ endif -$ @gnv_link_curl.com -$ endif -$! $! Make sure that the release note file name is up to date $!--------------------------------------------------------- $ @BUILD_GNV_CURL_RELEASE_NOTES.COM @@ -133,8 +107,6 @@ $ else $ version = "''mmversion'" $ endif $! -$ @stage_curl_install remove -$ @stage_curl_install $! $! Move to the base directories $ set def [--] @@ -142,7 +114,6 @@ $ current_default = f$environment("DEFAULT") $ my_dir = f$parse(current_default,,,"DIRECTORY") - "[" - "<" - ">" - "]" $! $! -$! $ source = "''default_dir'" $ src1 = "new_gnu:[usr.bin]," $ src2 = "new_gnu:[usr.include.curl]," @@ -157,6 +128,7 @@ $ gnu_src = src1 + src2 + src3 + src4 + src5 + src6 + src7 + src8 + src9 $! $! $ base = "" +$ arch_name = f$edit(f$getsyi("arch_name"),"UPCASE") $ if arch_name .eqs. "ALPHA" then base = "AXPVMS" $ if arch_name .eqs. "IA64" then base = "I64VMS" $ if arch_name .eqs. "VAX" then base = "VAXVMS" diff --git a/packaging/baselibs.conf b/packaging/baselibs.conf new file mode 100644 index 0000000..2dbf127 --- /dev/null +++ b/packaging/baselibs.conf @@ -0,0 +1 @@ +libcurl diff --git a/packaging/curl.changes b/packaging/curl.changes new file mode 100644 index 0000000..e05b821 --- /dev/null +++ b/packaging/curl.changes @@ -0,0 +1,7 @@ +* Wed Sep 4 2013 Patrick McCarty 71d6fee +- Packaging cleanups (fix RPM group tags, whitespace) +- Update to 7.32.0 (addresses multiple CVEs) + +* Fri Feb 15 2013 Anas Nashif upstream/7.21.3@96b84bd +- Add baselibs + diff --git a/packaging/curl.manifest b/packaging/curl.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/packaging/curl.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/curl.spec b/packaging/curl.spec index 56a2eaa..6cd08ad 100644 --- a/packaging/curl.spec +++ b/packaging/curl.spec @@ -1,20 +1,18 @@ -Name: curl -Summary: A utility for getting files from remote servers (FTP, HTTP, and others) -Version: 7.40.1 -Release: 1 -Group: Applications/Internet -License: MIT -URL: http://curl.haxx.se/ -#Source0: http://curl.haxx.se/download/%{name}-%{version}.tar.bz2 -Source0: %{name}-%{version}.tar.gz - -BuildRequires: pkgconfig(openssl) +Name: curl +Version: 7.37.1 +Release: 0 +License: MIT +Summary: A utility for getting files from remote servers (FTP, HTTP, and others) +Url: http://curl.haxx.se/ +Group: Base/Utilities +Source0: %{name}-%{version}.tar.bz2 +Source1001: %{name}.manifest +BuildRequires: pkgconfig(libcares) BuildRequires: pkgconfig(libidn) +BuildRequires: pkgconfig(nss) +BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(zlib) -BuildRequires: pkgconfig(libcares) -BuildRequires: pkgconfig(libnghttp2) -Provides: webclient - +Provides: webclient %description cURL is a tool for getting files from HTTP, FTP, FILE, LDAP, LDAPS, @@ -23,28 +21,21 @@ cURL is designed to work without user interaction or any kind of interactivity. cURL offers many useful capabilities, like proxy support, user authentication, FTP upload, HTTP post, and file transfer resume. - - %package -n libcurl -Summary: A library for getting files from web servers -Group: System/Libraries -License: MIT -Requires(post): /sbin/ldconfig -Requires(postun): /sbin/ldconfig +Summary: A library for getting files from web servers +Group: Base/Libraries %description -n libcurl This package provides a way for applications to use FTP, HTTP, Gopher and other servers for getting files. - %package -n libcurl-devel -Summary: Files needed for building applications with libcurl -Group: Development/Libraries -License: MIT -Requires: libcurl = %{version}-%{release} -Requires: libidn-devel -Provides: curl-devel = %{version}-%{release} -Obsoletes: curl-devel < %{version}-%{release} +Summary: Files needed for building applications with libcurl +Group: Base/Development +Requires: libcurl = %{version} +Requires: libidn-devel +Provides: curl-devel = %{version} +Obsoletes: curl-devel < %{version} %description -n libcurl-devel cURL is a tool for getting files from FTP, HTTP, Gopher, Telnet, and @@ -52,76 +43,64 @@ Dict servers, using any of the supported protocols. The libcurl-devel package includes files needed for developing applications which can use cURL's capabilities internally. - - %prep %setup -q - -#%patch01 -p1 -#%patch02 -p1 +cp %{SOURCE1001} . %build - -export CPPFLAGS="-DHAVE_PK11_CREATEGENERICOBJECT" - -%if "%{?tizen_profile_name}" == "tv" -CFLAGS+=" -DTIZEN_TV_EXT" -%reconfigure --without-nss --without-gnutls --with-openssl --disable-ipv6 \ -%else -%reconfigure --without-nss --without-gnutls --with-openssl --enable-ipv6 \ -%endif ---with-ca-path=/etc/ssl/certs \ ---with-libidn \ ---with-lber-lib=lber \ ---enable-manual --enable-versioned-symbols --enable-ares --enable-debug --enable-curldebug \ ---disable-static \ ---with-nghttp2 \ - -#--with-ca-bundle=%{_sysconfdir}/pki/tls/certs/ca-bundle.crt +export CPPFLAGS="$(pkg-config --cflags nss) -DHAVE_PK11_CREATEGENERICOBJECT" + +%reconfigure --without-nss \ + --without-gnutls \ + --with-openssl \ + --disable-ipv6 \ + --with-ca-path=/etc/ssl/certs \ + --with-libidn \ + --with-lber-lib=lber \ + --enable-manual \ + --enable-versioned-symbols \ + --enable-ares \ + --enable-debug \ + --enable-curldebug \ + --disable-static sed -i -e 's,-L/usr/lib ,,g;s,-L/usr/lib64 ,,g;s,-L/usr/lib$,,g;s,-L/usr/lib64$,,g' \ Makefile libcurl.pc + # Remove bogus rpath sed -i \ -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \ -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool -make %{?_smp_mflags} +%__make %{?_smp_mflags} %install -rm -rf %{buildroot} - -rm -rf $RPM_BUILD_ROOT - -make DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -p" install - -rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la -install -d $RPM_BUILD_ROOT/%{_datadir}/aclocal -install -m 644 docs/libcurl/libcurl.m4 $RPM_BUILD_ROOT/%{_datadir}/aclocal +%make_install INSTALL="install -p" +rm -f %{buildroot}%{_libdir}/libcurl.la +install -d %{buildroot}/%{_datadir}/aclocal +install -m 644 docs/libcurl/libcurl.m4 %{buildroot}/%{_datadir}/aclocal # don't need curl's copy of the certs; use openssl's -find ${RPM_BUILD_ROOT} -name ca-bundle.crt -exec rm -f '{}' \; -rm -rf ${RPM_BUILD_ROOT}/usr/share/man - -# LICENSE -rm -rf %{buildroot}/usr/share/license -mkdir -p %{buildroot}/usr/share/license -cp COPYING %{buildroot}/usr/share/license/%{name} +find %{buildroot} -name ca-bundle.crt -exec rm -f '{}' \; +rm -rf %{buildroot}%{_datadir}/man %post -n libcurl -p /sbin/ldconfig %postun -n libcurl -p /sbin/ldconfig %files +%manifest %{name}.manifest +%license COPYING %{_bindir}/curl %files -n libcurl %manifest %{name}.manifest +%license COPYING %{_libdir}/libcurl.so.* -/usr/share/license/%{name} %files -n libcurl-devel +%manifest %{name}.manifest %{_bindir}/curl-config* %{_includedir}/curl %{_libdir}/*.so diff --git a/projects/README b/projects/README index b45d783..a05f36c 100644 --- a/projects/README +++ b/projects/README @@ -27,7 +27,7 @@ Dependencies ============ The projects files also support build configurations that require third - party dependencies such as OpenSSL and SSH2. If you wish to support these, + party dependencies such as openssl and ssh2. If you wish to support these, you will also need to download and compile those libraries as well. To support compilation of these libraries using different versions of @@ -66,21 +66,10 @@ Building with Visual C++ part of Visual Studio. If you are building with VC6 then you will also need the February 2003 - Edition of the Windows Platform SDK which can be downloaded from: + Edition of the Platform SDK which can be downloaded from: http://www.microsoft.com/en-us/download/details.aspx?id=12261 - If you require support for Internationalized Domain Names via Windows IDN - then you will need either: - - * Microsoft Internationalized Domain Name (IDN) Mitigation APIs: - http://www.microsoft.com/en-us/download/details.aspx?id=734 - - * Microsoft Windows SDK Update for Windows Vista: - http://www.microsoft.com/en-us/download/details.aspx?id=23719 - - * Microsoft Visual Studio 2010 or above - Once you have VC++ installed you should launch the application and open one of the solution or workspace files. @@ -99,17 +88,6 @@ Notes - The target configuration (For example: DLL Debug, LIB Release - LIB OpenSSL) - 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. - - 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 - stored in the git repositoty) will need to be modified rather than the - generated project files that Visual Studio uses. - TODO ==== @@ -117,6 +95,7 @@ TODO are not 100% complete. This is a list of things that are still todo: * Support zlib + * Support WinIDN * Use of static runtime libraries * Generate *.vcxproj.filters files for VC10, VC11 and VC12 * Add the Test Suite components diff --git a/projects/Windows/VC10/curl.sln b/projects/Windows/VC10/curl.sln index 4501272..71947cd 100644 --- a/projects/Windows/VC10/curl.sln +++ b/projects/Windows/VC10/curl.sln @@ -13,8 +13,6 @@ Global 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|Win32 = DLL Debug|Win32 @@ -23,8 +21,6 @@ Global 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|Win32 = DLL Release|Win32 @@ -33,8 +29,6 @@ Global 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 @@ -47,8 +41,6 @@ Global 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 @@ -67,10 +59,6 @@ Global {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 @@ -87,10 +75,6 @@ Global {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 @@ -107,10 +91,6 @@ Global {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 @@ -135,10 +115,6 @@ Global {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 @@ -163,10 +139,6 @@ Global {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 @@ -183,10 +155,6 @@ Global {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 @@ -203,10 +171,6 @@ Global {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 @@ -231,10 +195,6 @@ Global {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 diff --git a/projects/Windows/VC10/lib/libcurl.sln b/projects/Windows/VC10/lib/libcurl.sln index f29eccd..e66c177 100644 --- a/projects/Windows/VC10/lib/libcurl.sln +++ b/projects/Windows/VC10/lib/libcurl.sln @@ -8,8 +8,6 @@ Global 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|Win32 = DLL Debug|Win32 @@ -18,8 +16,6 @@ Global 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|Win32 = DLL Release|Win32 @@ -28,8 +24,6 @@ Global 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 @@ -42,8 +36,6 @@ Global 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 @@ -62,10 +54,6 @@ Global {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 @@ -82,10 +70,6 @@ Global {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|Win32.Build.0 = DLL Debug - DLL OpenSSL|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|x64.ActiveCfg = DLL Debug - DLL OpenSSL|x64 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|x64.Build.0 = DLL Debug - 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 Debug - DLL Windows SSPI|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|Win32.Build.0 = DLL Debug - DLL Windows SSPI|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|x64.ActiveCfg = DLL Release - DLL Windows SSPI|x64 @@ -102,10 +86,6 @@ Global {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 @@ -130,10 +110,6 @@ Global {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 diff --git a/projects/Windows/VC10/lib/libcurl.tmpl b/projects/Windows/VC10/lib/libcurl.tmpl index f7106d3..4d8d02b 100644 --- a/projects/Windows/VC10/lib/libcurl.tmpl +++ b/projects/Windows/VC10/lib/libcurl.tmpl @@ -17,14 +17,6 @@ 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 @@ -57,14 +49,6 @@ 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 @@ -97,14 +81,6 @@ 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 @@ -153,14 +129,6 @@ 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 @@ -214,11 +182,6 @@ false MultiByte - - StaticLibrary - false - MultiByte - StaticLibrary false @@ -244,11 +207,6 @@ false MultiByte - - StaticLibrary - false - MultiByte - StaticLibrary false @@ -274,21 +232,11 @@ false MultiByte - - DynamicLibrary - false - MultiByte - DynamicLibrary false MultiByte - - DynamicLibrary - false - MultiByte - DynamicLibrary false @@ -334,11 +282,6 @@ false MultiByte - - StaticLibrary - false - MultiByte - StaticLibrary false @@ -364,11 +307,6 @@ false MultiByte - - StaticLibrary - false - MultiByte - StaticLibrary false @@ -394,21 +332,11 @@ false MultiByte - - DynamicLibrary - false - MultiByte - DynamicLibrary false MultiByte - - DynamicLibrary - false - MultiByte - DynamicLibrary false @@ -451,9 +379,6 @@ - - - @@ -469,9 +394,6 @@ - - - @@ -487,15 +409,9 @@ - - - - - - @@ -523,9 +439,6 @@ - - - @@ -541,9 +454,6 @@ - - - @@ -559,15 +469,9 @@ - - - - - - @@ -622,29 +526,17 @@ $(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 @@ -666,13 +558,9 @@ ..\..\..\..\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)\ @@ -690,13 +578,9 @@ ..\..\..\..\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)\ @@ -712,9 +596,7 @@ $(ProjectName)d $(ProjectName)d $(ProjectName)d - $(ProjectName)d $(ProjectName)d - $(ProjectName)d $(ProjectName)d $(ProjectName)d $(ProjectName)d @@ -722,9 +604,7 @@ $(ProjectName)d $(ProjectName)d $(ProjectName)d - $(ProjectName)d $(ProjectName)d - $(ProjectName)d $(ProjectName)d $(ProjectName)d $(ProjectName)d @@ -743,7 +623,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) + WIN32;_DEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -787,7 +667,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) + WIN64;_DEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -831,7 +711,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) + WIN32;NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -873,7 +753,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) + WIN64;NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -904,7 +784,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -933,7 +813,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN64;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -960,7 +840,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -989,7 +869,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN64;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -1023,7 +903,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN32;_DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1067,7 +947,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN64;_DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1111,7 +991,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN32;NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -1153,7 +1033,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN64;NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -1193,7 +1073,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + WIN32;_DEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1224,50 +1104,6 @@ $(OutDir)$(ProjectName).bsc - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;normaliz.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - %(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - true - $(TargetDir)$(TargetName).pdb - false - - - $(TargetDir)$(TargetName).lib - MachineX86 - - - true - $(OutDir)$(ProjectName).bsc - - _DEBUG;%(PreprocessorDefinitions) @@ -1281,7 +1117,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + WIN64;_DEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1311,49 +1147,6 @@ $(OutDir)$(ProjectName).bsc - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;normaliz.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - %(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - false - - - $(TargetDir)$(TargetName).lib - MachineX64 - - - true - $(OutDir)$(ProjectName).bsc - - NDEBUG;%(PreprocessorDefinitions) @@ -1368,7 +1161,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + WIN32;NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -1396,48 +1189,6 @@ $(OutDir)$(ProjectName).bsc - - - NDEBUG;%(PreprocessorDefinitions) - true - 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 - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;normaliz.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - %(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - false - - - $(TargetDir)$(TargetName).lib - MachineX86 - - - true - $(OutDir)$(ProjectName).bsc - - NDEBUG;%(PreprocessorDefinitions) @@ -1452,7 +1203,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + WIN64;NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -1479,47 +1230,6 @@ $(OutDir)$(ProjectName).bsc - - - NDEBUG;%(PreprocessorDefinitions) - true - 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 - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;normaliz.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - %(AdditionalLibraryDirectories) - false - - - $(TargetDir)$(TargetName).lib - MachineX64 - - - true - $(OutDir)$(ProjectName).bsc - - _DEBUG;%(PreprocessorDefinitions) @@ -1533,7 +1243,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN32;_DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1577,7 +1287,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN64;_DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1621,7 +1331,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN32;NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -1663,7 +1373,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN64;NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -1694,7 +1404,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN32;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1723,7 +1433,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN64;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1749,7 +1459,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN32;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1778,7 +1488,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN64;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1804,33 +1514,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - true - MachineX86 - - - true - $(OutDir)$(ProjectName).bsc - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + WIN32;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1859,36 +1543,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - true - MachineX64 - - - true - $(OutDir)$(ProjectName).bsc - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + WIN64;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1914,7 +1569,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN32;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1943,7 +1598,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN64;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1969,7 +1624,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN32;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1998,7 +1653,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN64;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -2025,7 +1680,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN32;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -2054,7 +1709,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN64;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -2080,7 +1735,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN32;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -2109,7 +1764,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN64;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -2135,33 +1790,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - true - MachineX86 - - - true - $(OutDir)$(ProjectName).bsc - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + WIN32;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -2190,36 +1819,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - true - MachineX64 - - - true - $(OutDir)$(ProjectName).bsc - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + WIN64;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -2245,7 +1845,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN32;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -2274,7 +1874,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN64;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -2300,7 +1900,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN32;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -2329,7 +1929,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN64;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true MultiThreadedDLL true diff --git a/projects/Windows/VC10/src/curlsrc.sln b/projects/Windows/VC10/src/curlsrc.sln index 13fc1d3..fd0e5c4 100644 --- a/projects/Windows/VC10/src/curlsrc.sln +++ b/projects/Windows/VC10/src/curlsrc.sln @@ -8,8 +8,6 @@ Global 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|Win32 = DLL Debug|Win32 @@ -18,8 +16,6 @@ Global 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|Win32 = DLL Release|Win32 @@ -28,8 +24,6 @@ Global 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 @@ -42,8 +36,6 @@ Global 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 @@ -62,10 +54,6 @@ Global {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 @@ -82,10 +70,6 @@ Global {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 @@ -102,10 +86,6 @@ Global {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 @@ -130,10 +110,6 @@ Global {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 diff --git a/projects/Windows/VC10/src/curlsrc.tmpl b/projects/Windows/VC10/src/curlsrc.tmpl index 2317181..03897b2 100644 --- a/projects/Windows/VC10/src/curlsrc.tmpl +++ b/projects/Windows/VC10/src/curlsrc.tmpl @@ -17,14 +17,6 @@ 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 @@ -57,14 +49,6 @@ 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 @@ -97,14 +81,6 @@ 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 @@ -153,14 +129,6 @@ 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 @@ -204,21 +172,11 @@ false MultiByte - - Application - false - MultiByte - Application false MultiByte - - Application - false - MultiByte - Application false @@ -274,11 +232,6 @@ false MultiByte - - Application - false - MultiByte - Application false @@ -289,11 +242,6 @@ false MultiByte - - Application - false - MultiByte - Application false @@ -324,21 +272,11 @@ false MultiByte - - Application - false - MultiByte - Application false MultiByte - - Application - false - MultiByte - Application false @@ -394,11 +332,6 @@ false MultiByte - - Application - false - MultiByte - Application false @@ -409,11 +342,6 @@ false MultiByte - - Application - false - MultiByte - Application false @@ -445,15 +373,9 @@ - - - - - - @@ -487,18 +409,12 @@ - - - - - - @@ -517,15 +433,9 @@ - - - - - - @@ -559,18 +469,12 @@ - - - - - - @@ -620,17 +524,11 @@ $(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 @@ -638,17 +536,11 @@ $(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 @@ -710,29 +602,17 @@ $(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 curld curld curld @@ -740,9 +620,7 @@ curld curld curld - curld curld - curld curld curld curld @@ -750,9 +628,7 @@ curld curld curld - curld curld - curld curld curld curld @@ -760,24 +636,20 @@ curl curl curl - curl curl curl curl curl - curl curl curl curl curl curl curl - curl curl curl curl curl - curl curl curl curl @@ -792,10 +664,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -831,10 +707,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -869,10 +749,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -908,10 +792,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -945,10 +833,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -986,10 +878,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1026,10 +922,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1067,10 +967,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1107,10 +1011,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1148,10 +1056,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1188,50 +1100,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - false - - - MachineX86 - - - true - $(TargetDir)$(TargetName).bsc - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1269,51 +1145,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - false - - - MachineX64 - - - true - $(TargetDir)$(TargetName).bsc - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1351,10 +1190,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -1390,10 +1233,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -1428,48 +1275,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) - Console - false - - - MachineX86 - - - true - $(TargetDir)$(TargetName).bsc - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -1505,49 +1318,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) - Console - false - - - MachineX64 - - - true - $(TargetDir)$(TargetName).bsc - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -1581,10 +1359,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1622,10 +1404,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1663,10 +1449,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -1702,10 +1492,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -1739,10 +1533,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1780,10 +1578,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1821,10 +1623,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -1860,10 +1666,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -1897,10 +1707,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1938,10 +1752,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1979,10 +1797,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -2018,10 +1840,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -2055,10 +1881,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -2096,10 +1926,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -2137,10 +1971,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -2176,10 +2014,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -2213,10 +2055,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -2254,10 +2100,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -2295,10 +2145,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -2334,10 +2188,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -2371,10 +2229,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -2402,46 +2264,6 @@ $(TargetDir)$(TargetName).bsc - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;normaliz.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - false - - - MachineX86 - - - true - $(TargetDir)$(TargetName).bsc - - X64 @@ -2452,10 +2274,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -2483,47 +2309,6 @@ $(TargetDir)$(TargetName).bsc - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;normaliz.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - false - - - MachineX64 - - - true - $(TargetDir)$(TargetName).bsc - - $(TargetDir)$(TargetName).tlb @@ -2534,10 +2319,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -2562,44 +2351,6 @@ $(TargetDir)$(TargetName).bsc - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;normaliz.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) - Console - false - - - MachineX86 - - - true - $(TargetDir)$(TargetName).bsc - - X64 @@ -2611,10 +2362,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -2639,45 +2394,6 @@ $(TargetDir)$(TargetName).bsc - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;normaliz.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) - Console - false - - - MachineX64 - - - true - $(TargetDir)$(TargetName).bsc - - CURL_SRC_X_C_FILES CURL_SRC_C_FILES diff --git a/projects/Windows/VC11/curl.sln b/projects/Windows/VC11/curl.sln index c9085a9..c0f4c7b 100644 --- a/projects/Windows/VC11/curl.sln +++ b/projects/Windows/VC11/curl.sln @@ -13,8 +13,6 @@ Global 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|Win32 = DLL Debug|Win32 @@ -23,8 +21,6 @@ Global 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|Win32 = DLL Release|Win32 @@ -33,8 +29,6 @@ Global 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 @@ -47,8 +41,6 @@ Global 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 @@ -67,10 +59,6 @@ Global {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 @@ -87,10 +75,6 @@ Global {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 @@ -107,10 +91,6 @@ Global {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 @@ -135,10 +115,6 @@ Global {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 @@ -163,10 +139,6 @@ Global {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 @@ -183,10 +155,6 @@ Global {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 @@ -203,10 +171,6 @@ Global {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 @@ -231,10 +195,6 @@ Global {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 diff --git a/projects/Windows/VC11/lib/libcurl.sln b/projects/Windows/VC11/lib/libcurl.sln index 9e3b9ed..30c8ba4 100644 --- a/projects/Windows/VC11/lib/libcurl.sln +++ b/projects/Windows/VC11/lib/libcurl.sln @@ -8,8 +8,6 @@ Global 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|Win32 = DLL Debug|Win32 @@ -18,8 +16,6 @@ Global 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|Win32 = DLL Release|Win32 @@ -28,8 +24,6 @@ Global 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 @@ -42,8 +36,6 @@ Global 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 @@ -62,10 +54,6 @@ Global {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 @@ -82,10 +70,6 @@ Global {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|Win32.Build.0 = DLL Debug - DLL OpenSSL|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|x64.ActiveCfg = DLL Debug - DLL OpenSSL|x64 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|x64.Build.0 = DLL Debug - 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 Debug - DLL Windows SSPI|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|Win32.Build.0 = DLL Debug - DLL Windows SSPI|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|x64.ActiveCfg = DLL Release - DLL Windows SSPI|x64 @@ -102,10 +86,6 @@ Global {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 @@ -130,10 +110,6 @@ Global {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 diff --git a/projects/Windows/VC11/lib/libcurl.tmpl b/projects/Windows/VC11/lib/libcurl.tmpl index bf5ccf0..c763f39 100644 --- a/projects/Windows/VC11/lib/libcurl.tmpl +++ b/projects/Windows/VC11/lib/libcurl.tmpl @@ -17,14 +17,6 @@ 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 @@ -57,14 +49,6 @@ 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 @@ -97,14 +81,6 @@ 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 @@ -153,14 +129,6 @@ 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 @@ -217,12 +185,6 @@ MultiByte v110 - - StaticLibrary - false - MultiByte - v110 - StaticLibrary false @@ -253,12 +215,6 @@ MultiByte v110 - - StaticLibrary - false - MultiByte - v110 - StaticLibrary false @@ -289,24 +245,12 @@ MultiByte v110 - - DynamicLibrary - false - MultiByte - v110 - DynamicLibrary false MultiByte v110 - - DynamicLibrary - false - MultiByte - v110 - DynamicLibrary false @@ -361,12 +305,6 @@ MultiByte v110 - - StaticLibrary - false - MultiByte - v110 - StaticLibrary false @@ -397,12 +335,6 @@ MultiByte v110 - - StaticLibrary - false - MultiByte - v110 - StaticLibrary false @@ -433,24 +365,12 @@ MultiByte v110 - - DynamicLibrary - false - MultiByte - v110 - DynamicLibrary false MultiByte v110 - - DynamicLibrary - false - MultiByte - v110 - DynamicLibrary false @@ -499,9 +419,6 @@ - - - @@ -517,9 +434,6 @@ - - - @@ -535,15 +449,9 @@ - - - - - - @@ -571,9 +479,6 @@ - - - @@ -589,9 +494,6 @@ - - - @@ -607,15 +509,9 @@ - - - - - - @@ -670,29 +566,17 @@ $(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 @@ -714,13 +598,9 @@ ..\..\..\..\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)\ @@ -738,13 +618,9 @@ ..\..\..\..\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)\ @@ -760,9 +636,7 @@ $(ProjectName)d $(ProjectName)d $(ProjectName)d - $(ProjectName)d $(ProjectName)d - $(ProjectName)d $(ProjectName)d $(ProjectName)d $(ProjectName)d @@ -770,9 +644,7 @@ $(ProjectName)d $(ProjectName)d $(ProjectName)d - $(ProjectName)d $(ProjectName)d - $(ProjectName)d $(ProjectName)d $(ProjectName)d $(ProjectName)d @@ -791,7 +663,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) + WIN32;_DEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -835,7 +707,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) + WIN64;_DEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -879,7 +751,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) + WIN32;NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -921,7 +793,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) + WIN64;NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -952,7 +824,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -981,7 +853,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN64;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1008,7 +880,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -1037,7 +909,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN64;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -1071,7 +943,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN32;_DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1115,7 +987,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN64;_DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1159,7 +1031,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN32;NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -1201,7 +1073,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN64;NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -1241,7 +1113,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + WIN32;_DEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1272,50 +1144,6 @@ $(OutDir)$(ProjectName).bsc - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;normaliz.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - %(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - true - $(TargetDir)$(TargetName).pdb - false - - - $(TargetDir)$(TargetName).lib - MachineX86 - - - true - $(OutDir)$(ProjectName).bsc - - _DEBUG;%(PreprocessorDefinitions) @@ -1329,7 +1157,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + WIN64;_DEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1359,49 +1187,6 @@ $(OutDir)$(ProjectName).bsc - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;normaliz.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - %(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - false - - - $(TargetDir)$(TargetName).lib - MachineX64 - - - true - $(OutDir)$(ProjectName).bsc - - NDEBUG;%(PreprocessorDefinitions) @@ -1416,7 +1201,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + WIN32;NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -1444,48 +1229,6 @@ $(OutDir)$(ProjectName).bsc - - - NDEBUG;%(PreprocessorDefinitions) - true - 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 - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;normaliz.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - %(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - false - - - $(TargetDir)$(TargetName).lib - MachineX86 - - - true - $(OutDir)$(ProjectName).bsc - - NDEBUG;%(PreprocessorDefinitions) @@ -1500,7 +1243,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + WIN64;NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -1527,47 +1270,6 @@ $(OutDir)$(ProjectName).bsc - - - NDEBUG;%(PreprocessorDefinitions) - true - 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 - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;normaliz.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - %(AdditionalLibraryDirectories) - false - - - $(TargetDir)$(TargetName).lib - MachineX64 - - - true - $(OutDir)$(ProjectName).bsc - - _DEBUG;%(PreprocessorDefinitions) @@ -1581,7 +1283,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN32;_DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1625,7 +1327,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN64;_DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1669,7 +1371,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN32;NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -1711,7 +1413,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN64;NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -1742,7 +1444,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN32;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1771,7 +1473,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN64;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1797,7 +1499,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN32;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1826,7 +1528,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN64;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1852,33 +1554,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - true - MachineX86 - - - true - $(OutDir)$(ProjectName).bsc - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + WIN32;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1907,36 +1583,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - true - MachineX64 - - - true - $(OutDir)$(ProjectName).bsc - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + WIN64;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1962,7 +1609,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN32;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1991,7 +1638,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN64;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -2017,7 +1664,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN32;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -2046,7 +1693,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN64;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -2073,7 +1720,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN32;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -2102,7 +1749,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN64;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -2128,7 +1775,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN32;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -2157,7 +1804,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN64;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -2183,33 +1830,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - true - MachineX86 - - - true - $(OutDir)$(ProjectName).bsc - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + WIN32;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -2238,36 +1859,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - true - MachineX64 - - - true - $(OutDir)$(ProjectName).bsc - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + WIN64;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -2293,7 +1885,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN32;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -2322,7 +1914,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN64;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -2348,7 +1940,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN32;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -2377,7 +1969,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN64;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true MultiThreadedDLL true diff --git a/projects/Windows/VC11/src/curlsrc.sln b/projects/Windows/VC11/src/curlsrc.sln index 88b4f7e..b1b8f4b 100644 --- a/projects/Windows/VC11/src/curlsrc.sln +++ b/projects/Windows/VC11/src/curlsrc.sln @@ -8,8 +8,6 @@ Global 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|Win32 = DLL Debug|Win32 @@ -18,8 +16,6 @@ Global 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|Win32 = DLL Release|Win32 @@ -28,8 +24,6 @@ Global 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 @@ -42,8 +36,6 @@ Global 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 @@ -62,10 +54,6 @@ Global {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 @@ -82,10 +70,6 @@ Global {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 @@ -102,10 +86,6 @@ Global {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 @@ -130,10 +110,6 @@ Global {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 diff --git a/projects/Windows/VC11/src/curlsrc.tmpl b/projects/Windows/VC11/src/curlsrc.tmpl index 5ce8347..7da5eff 100644 --- a/projects/Windows/VC11/src/curlsrc.tmpl +++ b/projects/Windows/VC11/src/curlsrc.tmpl @@ -17,14 +17,6 @@ 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 @@ -57,14 +49,6 @@ 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 @@ -97,14 +81,6 @@ 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 @@ -153,14 +129,6 @@ 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 @@ -205,24 +173,12 @@ MultiByte v110 - - Application - false - MultiByte - v110 - Application false MultiByte v110 - - Application - false - MultiByte - v110 - Application false @@ -289,12 +245,6 @@ MultiByte v110 - - Application - false - MultiByte - v110 - Application false @@ -307,12 +257,6 @@ MultiByte v110 - - Application - false - MultiByte - v110 - Application false @@ -349,24 +293,12 @@ MultiByte v110 - - Application - false - MultiByte - v110 - Application false MultiByte v110 - - Application - false - MultiByte - v110 - Application false @@ -433,12 +365,6 @@ MultiByte v110 - - Application - false - MultiByte - v110 - Application false @@ -451,12 +377,6 @@ MultiByte v110 - - Application - false - MultiByte - v110 - Application false @@ -493,15 +413,9 @@ - - - - - - @@ -535,18 +449,12 @@ - - - - - - @@ -565,15 +473,9 @@ - - - - - - @@ -607,18 +509,12 @@ - - - - - - @@ -668,17 +564,11 @@ $(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 @@ -686,17 +576,11 @@ $(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 @@ -758,29 +642,17 @@ $(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 curld curld curld @@ -788,9 +660,7 @@ curld curld curld - curld curld - curld curld curld curld @@ -798,9 +668,7 @@ curld curld curld - curld curld - curld curld curld curld @@ -808,24 +676,20 @@ curl curl curl - curl curl curl curl curl - curl curl curl curl curl curl curl - curl curl curl curl curl - curl curl curl curl @@ -840,10 +704,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -879,10 +747,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -917,10 +789,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -956,10 +832,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -993,10 +873,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1034,10 +918,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1074,10 +962,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1115,10 +1007,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1155,10 +1051,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1196,10 +1096,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1236,50 +1140,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - false - - - MachineX86 - - - true - $(TargetDir)$(TargetName).bsc - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1317,51 +1185,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - false - - - MachineX64 - - - true - $(TargetDir)$(TargetName).bsc - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1399,10 +1230,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -1438,10 +1273,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -1476,48 +1315,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) - Console - false - - - MachineX86 - - - true - $(TargetDir)$(TargetName).bsc - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -1553,49 +1358,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) - Console - false - - - MachineX64 - - - true - $(TargetDir)$(TargetName).bsc - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -1629,10 +1399,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1670,10 +1444,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1711,10 +1489,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -1750,10 +1532,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -1787,10 +1573,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1828,10 +1618,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1869,10 +1663,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -1908,10 +1706,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -1945,10 +1747,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1986,10 +1792,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -2027,10 +1837,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -2066,10 +1880,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -2103,10 +1921,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -2144,10 +1966,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -2185,10 +2011,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -2224,10 +2054,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -2261,10 +2095,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -2302,10 +2140,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -2343,10 +2185,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -2382,10 +2228,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -2419,10 +2269,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -2450,46 +2304,6 @@ $(TargetDir)$(TargetName).bsc - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;normaliz.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - false - - - MachineX86 - - - true - $(TargetDir)$(TargetName).bsc - - X64 @@ -2500,10 +2314,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -2531,47 +2349,6 @@ $(TargetDir)$(TargetName).bsc - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;normaliz.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - false - - - MachineX64 - - - true - $(TargetDir)$(TargetName).bsc - - $(TargetDir)$(TargetName).tlb @@ -2582,10 +2359,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -2610,44 +2391,6 @@ $(TargetDir)$(TargetName).bsc - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;normaliz.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) - Console - false - - - MachineX86 - - - true - $(TargetDir)$(TargetName).bsc - - X64 @@ -2659,10 +2402,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -2687,45 +2434,6 @@ $(TargetDir)$(TargetName).bsc - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;normaliz.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) - Console - false - - - MachineX64 - - - true - $(TargetDir)$(TargetName).bsc - - CURL_SRC_X_C_FILES CURL_SRC_C_FILES diff --git a/projects/Windows/VC12/curl.sln b/projects/Windows/VC12/curl.sln index 57064c4..9345f7f 100644 --- a/projects/Windows/VC12/curl.sln +++ b/projects/Windows/VC12/curl.sln @@ -13,8 +13,6 @@ Global 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|Win32 = DLL Debug|Win32 @@ -23,8 +21,6 @@ Global 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|Win32 = DLL Release|Win32 @@ -33,8 +29,6 @@ Global 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 @@ -47,8 +41,6 @@ Global 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 @@ -67,10 +59,6 @@ Global {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 @@ -87,10 +75,6 @@ Global {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 @@ -107,10 +91,6 @@ Global {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 @@ -135,10 +115,6 @@ Global {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 @@ -163,10 +139,6 @@ Global {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 @@ -183,10 +155,6 @@ Global {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 @@ -203,10 +171,6 @@ Global {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 @@ -231,10 +195,6 @@ Global {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 diff --git a/projects/Windows/VC12/lib/libcurl.sln b/projects/Windows/VC12/lib/libcurl.sln index 6fe2772..3f13ce0 100644 --- a/projects/Windows/VC12/lib/libcurl.sln +++ b/projects/Windows/VC12/lib/libcurl.sln @@ -8,8 +8,6 @@ Global 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|Win32 = DLL Debug|Win32 @@ -18,8 +16,6 @@ Global 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|Win32 = DLL Release|Win32 @@ -28,8 +24,6 @@ Global 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 @@ -42,8 +36,6 @@ Global 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 @@ -62,10 +54,6 @@ Global {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 @@ -82,10 +70,6 @@ Global {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|Win32.Build.0 = DLL Debug - DLL OpenSSL|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|x64.ActiveCfg = DLL Debug - DLL OpenSSL|x64 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|x64.Build.0 = DLL Debug - 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 Debug - DLL Windows SSPI|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|Win32.Build.0 = DLL Debug - DLL Windows SSPI|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|x64.ActiveCfg = DLL Release - DLL Windows SSPI|x64 @@ -102,10 +86,6 @@ Global {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 @@ -130,10 +110,6 @@ Global {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 diff --git a/projects/Windows/VC12/lib/libcurl.tmpl b/projects/Windows/VC12/lib/libcurl.tmpl index 6cecf5d..a546fea 100644 --- a/projects/Windows/VC12/lib/libcurl.tmpl +++ b/projects/Windows/VC12/lib/libcurl.tmpl @@ -17,14 +17,6 @@ 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 @@ -57,14 +49,6 @@ 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 @@ -97,14 +81,6 @@ 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 @@ -153,14 +129,6 @@ 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 @@ -217,12 +185,6 @@ MultiByte v120 - - StaticLibrary - false - MultiByte - v120 - StaticLibrary false @@ -253,12 +215,6 @@ MultiByte v120 - - StaticLibrary - false - MultiByte - v120 - StaticLibrary false @@ -289,24 +245,12 @@ MultiByte v120 - - DynamicLibrary - false - MultiByte - v120 - DynamicLibrary false MultiByte v120 - - DynamicLibrary - false - MultiByte - v120 - DynamicLibrary false @@ -361,12 +305,6 @@ MultiByte v120 - - StaticLibrary - false - MultiByte - v120 - StaticLibrary false @@ -397,12 +335,6 @@ MultiByte v120 - - StaticLibrary - false - MultiByte - v120 - StaticLibrary false @@ -433,24 +365,12 @@ MultiByte v120 - - DynamicLibrary - false - MultiByte - v120 - DynamicLibrary false MultiByte v120 - - DynamicLibrary - false - MultiByte - v120 - DynamicLibrary false @@ -499,9 +419,6 @@ - - - @@ -517,9 +434,6 @@ - - - @@ -535,15 +449,9 @@ - - - - - - @@ -571,9 +479,6 @@ - - - @@ -589,9 +494,6 @@ - - - @@ -607,15 +509,9 @@ - - - - - - @@ -670,29 +566,17 @@ $(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 @@ -714,13 +598,9 @@ ..\..\..\..\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)\ @@ -738,13 +618,9 @@ ..\..\..\..\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)\ @@ -760,9 +636,7 @@ $(ProjectName)d $(ProjectName)d $(ProjectName)d - $(ProjectName)d $(ProjectName)d - $(ProjectName)d $(ProjectName)d $(ProjectName)d $(ProjectName)d @@ -770,9 +644,7 @@ $(ProjectName)d $(ProjectName)d $(ProjectName)d - $(ProjectName)d $(ProjectName)d - $(ProjectName)d $(ProjectName)d $(ProjectName)d $(ProjectName)d @@ -791,7 +663,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) + WIN32;_DEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -835,7 +707,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) + WIN64;_DEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -879,7 +751,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) + WIN32;NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -921,7 +793,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) + WIN64;NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -952,7 +824,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -981,7 +853,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN64;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1008,7 +880,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -1037,7 +909,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN64;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -1071,7 +943,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN32;_DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1115,7 +987,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN64;_DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1159,7 +1031,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN32;NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -1201,7 +1073,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN64;NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -1241,7 +1113,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + WIN32;_DEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1272,50 +1144,6 @@ $(OutDir)$(ProjectName).bsc - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;normaliz.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - %(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - true - $(TargetDir)$(TargetName).pdb - false - - - $(TargetDir)$(TargetName).lib - MachineX86 - - - true - $(OutDir)$(ProjectName).bsc - - _DEBUG;%(PreprocessorDefinitions) @@ -1329,7 +1157,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + WIN64;_DEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1359,49 +1187,6 @@ $(OutDir)$(ProjectName).bsc - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;normaliz.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - %(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - false - - - $(TargetDir)$(TargetName).lib - MachineX64 - - - true - $(OutDir)$(ProjectName).bsc - - NDEBUG;%(PreprocessorDefinitions) @@ -1416,7 +1201,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + WIN32;NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -1444,48 +1229,6 @@ $(OutDir)$(ProjectName).bsc - - - NDEBUG;%(PreprocessorDefinitions) - true - 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 - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;normaliz.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - %(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - false - - - $(TargetDir)$(TargetName).lib - MachineX86 - - - true - $(OutDir)$(ProjectName).bsc - - NDEBUG;%(PreprocessorDefinitions) @@ -1500,7 +1243,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + WIN64;NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -1527,47 +1270,6 @@ $(OutDir)$(ProjectName).bsc - - - NDEBUG;%(PreprocessorDefinitions) - true - 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 - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;normaliz.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - %(AdditionalLibraryDirectories) - false - - - $(TargetDir)$(TargetName).lib - MachineX64 - - - true - $(OutDir)$(ProjectName).bsc - - _DEBUG;%(PreprocessorDefinitions) @@ -1581,7 +1283,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN32;_DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1625,7 +1327,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN64;_DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1669,7 +1371,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN32;NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -1711,7 +1413,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN64;NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -1742,7 +1444,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN32;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1771,7 +1473,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN64;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1797,7 +1499,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN32;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1826,7 +1528,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN64;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1852,33 +1554,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - true - MachineX86 - - - true - $(OutDir)$(ProjectName).bsc - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + WIN32;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1907,36 +1583,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - true - MachineX64 - - - true - $(OutDir)$(ProjectName).bsc - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + WIN64;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1962,7 +1609,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN32;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -1991,7 +1638,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN64;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -2017,7 +1664,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN32;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -2046,7 +1693,7 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN64;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -2073,7 +1720,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN32;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -2102,7 +1749,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN64;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -2128,7 +1775,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN32;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -2157,7 +1804,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN64;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -2183,33 +1830,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - true - MachineX86 - - - true - $(OutDir)$(ProjectName).bsc - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + WIN32;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -2238,36 +1859,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - true - MachineX64 - - - true - $(OutDir)$(ProjectName).bsc - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + WIN64;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -2293,7 +1885,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN32;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -2322,7 +1914,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) + WIN64;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -2348,7 +1940,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN32;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -2377,7 +1969,7 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + WIN64;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) true MultiThreadedDLL true diff --git a/projects/Windows/VC12/src/curlsrc.sln b/projects/Windows/VC12/src/curlsrc.sln index 292699c..6cc3073 100644 --- a/projects/Windows/VC12/src/curlsrc.sln +++ b/projects/Windows/VC12/src/curlsrc.sln @@ -8,8 +8,6 @@ Global 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|Win32 = DLL Debug|Win32 @@ -18,8 +16,6 @@ Global 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|Win32 = DLL Release|Win32 @@ -28,8 +24,6 @@ Global 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 @@ -42,8 +36,6 @@ Global 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 @@ -62,10 +54,6 @@ Global {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 @@ -82,10 +70,6 @@ Global {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 @@ -102,10 +86,6 @@ Global {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 @@ -130,10 +110,6 @@ Global {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 diff --git a/projects/Windows/VC12/src/curlsrc.tmpl b/projects/Windows/VC12/src/curlsrc.tmpl index 3a03eef..8c02888 100644 --- a/projects/Windows/VC12/src/curlsrc.tmpl +++ b/projects/Windows/VC12/src/curlsrc.tmpl @@ -17,14 +17,6 @@ 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 @@ -57,14 +49,6 @@ 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 @@ -97,14 +81,6 @@ 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 @@ -153,14 +129,6 @@ 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 @@ -205,24 +173,12 @@ MultiByte v120 - - Application - false - MultiByte - v120 - Application false MultiByte v120 - - Application - false - MultiByte - v120 - Application false @@ -289,12 +245,6 @@ MultiByte v120 - - Application - false - MultiByte - v120 - Application false @@ -307,12 +257,6 @@ MultiByte v120 - - Application - false - MultiByte - v120 - Application false @@ -349,24 +293,12 @@ MultiByte v120 - - Application - false - MultiByte - v120 - Application false MultiByte v120 - - Application - false - MultiByte - v120 - Application false @@ -433,12 +365,6 @@ MultiByte v120 - - Application - false - MultiByte - v120 - Application false @@ -451,12 +377,6 @@ MultiByte v120 - - Application - false - MultiByte - v120 - Application false @@ -493,15 +413,9 @@ - - - - - - @@ -535,18 +449,12 @@ - - - - - - @@ -565,15 +473,9 @@ - - - - - - @@ -607,18 +509,12 @@ - - - - - - @@ -668,17 +564,11 @@ $(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 @@ -686,17 +576,11 @@ $(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 @@ -758,29 +642,17 @@ $(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 curld curld curld @@ -788,9 +660,7 @@ curld curld curld - curld curld - curld curld curld curld @@ -798,9 +668,7 @@ curld curld curld - curld curld - curld curld curld curld @@ -808,24 +676,20 @@ curl curl curl - curl curl curl curl curl - curl curl curl curl curl curl curl - curl curl curl curl curl - curl curl curl curl @@ -840,10 +704,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -879,10 +747,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -917,10 +789,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -956,10 +832,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -993,10 +873,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1034,10 +918,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1074,10 +962,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1115,10 +1007,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1155,10 +1051,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1196,10 +1096,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1236,50 +1140,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - false - - - MachineX86 - - - true - $(TargetDir)$(TargetName).bsc - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1317,51 +1185,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - false - - - MachineX64 - - - true - $(TargetDir)$(TargetName).bsc - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1399,10 +1230,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -1438,10 +1273,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -1476,48 +1315,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) - Console - false - - - MachineX86 - - - true - $(TargetDir)$(TargetName).bsc - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -1553,49 +1358,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) - Console - false - - - MachineX64 - - - true - $(TargetDir)$(TargetName).bsc - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -1629,10 +1399,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1670,10 +1444,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1711,10 +1489,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -1750,10 +1532,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -1787,10 +1573,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1828,10 +1618,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1869,10 +1663,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -1908,10 +1706,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -1945,10 +1747,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -1986,10 +1792,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -2027,10 +1837,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -2066,10 +1880,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -2103,10 +1921,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -2144,10 +1966,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -2185,10 +2011,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -2224,10 +2054,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -2261,10 +2095,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -2302,10 +2140,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -2343,10 +2185,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -2382,10 +2228,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -2419,10 +2269,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -2450,46 +2304,6 @@ $(TargetDir)$(TargetName).bsc - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;normaliz.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - false - - - MachineX86 - - - true - $(TargetDir)$(TargetName).bsc - - X64 @@ -2500,10 +2314,14 @@ Disabled ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true ProgramDatabase @@ -2531,47 +2349,6 @@ $(TargetDir)$(TargetName).bsc - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;normaliz.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - false - - - MachineX64 - - - true - $(TargetDir)$(TargetName).bsc - - $(TargetDir)$(TargetName).tlb @@ -2582,10 +2359,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -2610,44 +2391,6 @@ $(TargetDir)$(TargetName).bsc - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;normaliz.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) - Console - false - - - MachineX86 - - - true - $(TargetDir)$(TargetName).bsc - - X64 @@ -2659,10 +2402,14 @@ MaxSpeed OnlyExplicitInline ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) true MultiThreadedDLL true + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(IntDir) Level3 true @@ -2687,45 +2434,6 @@ $(TargetDir)$(TargetName).bsc - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;normaliz.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - true - ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) - Console - false - - - MachineX64 - - - true - $(TargetDir)$(TargetName).bsc - - CURL_SRC_X_C_FILES CURL_SRC_C_FILES diff --git a/projects/Windows/VC6/lib/libcurl.tmpl b/projects/Windows/VC6/lib/libcurl.tmpl index 82a213b..9deb2ce 100644 --- a/projects/Windows/VC6/lib/libcurl.tmpl +++ b/projects/Windows/VC6/lib/libcurl.tmpl @@ -22,24 +22,20 @@ CFG=libcurl - Win32 LIB Debug !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 @@ -63,8 +59,8 @@ CFG=libcurl - Win32 LIB Debug # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /FD /EHsc /GZ /c +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "WIN32" /D "_DEBUG" /D "BUILDING_LIBCURL" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "WIN32" /D "_DEBUG" /D "BUILDING_LIBCURL" /FD /EHsc /GZ /c MTL=midl.exe # ADD BASE MTL /nologo /D "_DEBUG" /win32 # ADD MTL /nologo /D "_DEBUG" /win32 @@ -93,8 +89,8 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "USE_SSLEAY" /D "USE_OPENSSL" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "USE_SSLEAY" /D "USE_OPENSSL" /FD /EHsc /GZ /c +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "WIN32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "USE_SSLEAY" /D "USE_OPENSSL" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "WIN32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "USE_SSLEAY" /D "USE_OPENSSL" /FD /EHsc /GZ /c MTL=midl.exe # ADD BASE MTL /nologo /D "_DEBUG" /win32 # ADD MTL /nologo /D "_DEBUG" /win32 @@ -123,8 +119,8 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "USE_SSLEAY" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "USE_SSLEAY" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "WIN32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "USE_SSLEAY" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "WIN32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "USE_SSLEAY" /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 @@ -153,8 +149,8 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "USE_WINDOWS_SSPI" /D "USE_SCHANNEL" /FD /EHsc /GZ /c +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "WIN32" /D "_DEBUG" /D "BUILDING_LIBCURL" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "WIN32" /D "_DEBUG" /D "BUILDING_LIBCURL" /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 @@ -168,36 +164,6 @@ 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 - DLL Windows SSPI\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 - 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 /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "USE_WINDOWS_SSPI" /D "USE_SCHANNEL" /D "USE_WIN32_IDN" /D "WANT_IDN_PROTOTYPES" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /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 /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 /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 @@ -212,8 +178,8 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" CPP=cl.exe -# ADD BASE CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "NDEBUG" /D "BUILDING_LIBCURL" /FD /EHsc /c -# ADD CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "NDEBUG" /D "BUILDING_LIBCURL" /FD /EHsc /c +# ADD BASE CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "WIN32" /D "NDEBUG" /D "BUILDING_LIBCURL" /FD /EHsc /c +# ADD CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "WIN32" /D "NDEBUG" /D "BUILDING_LIBCURL" /FD /EHsc /c MTL=midl.exe # ADD BASE MTL /nologo /D "NDEBUG" /win32 # ADD MTL /nologo /D "NDEBUG" /win32 @@ -242,8 +208,8 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" CPP=cl.exe -# ADD BASE CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "USE_SSLEAY" /D "USE_OPENSSL" /FD /EHsc /c -# ADD CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "USE_SSLEAY" /D "USE_OPENSSL" /FD /EHsc /c +# ADD BASE CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "WIN32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "USE_SSLEAY" /D "USE_OPENSSL" /FD /EHsc /c +# ADD CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "WIN32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "USE_SSLEAY" /D "USE_OPENSSL" /FD /EHsc /c MTL=midl.exe # ADD BASE MTL /nologo /D "NDEBUG" /win32 # ADD MTL /nologo /D "NDEBUG" /win32 @@ -272,8 +238,8 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" CPP=cl.exe -# ADD BASE CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "USE_SSLEAY" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c -# ADD CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "USE_SSLEAY" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c +# ADD BASE CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "WIN32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "USE_SSLEAY" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c +# ADD CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "WIN32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "USE_SSLEAY" /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 @@ -302,8 +268,8 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" CPP=cl.exe -# ADD BASE CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "NDEBUG" /D "BUILDING_LIBCURL" /FD /EHsc /c -# ADD CPP /nologo /MD /W3 /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 +# ADD BASE CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "WIN32" /D "NDEBUG" /D "BUILDING_LIBCURL" /FD /EHsc /c +# ADD CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "WIN32" /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 @@ -317,36 +283,6 @@ 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 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 /W3 /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 /W3 /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 /nologo /dll /pdb:none /machine:I386 /fixed:no /release -# ADD LINK32 advapi32.lib normaliz.lib wldap32.lib ws2_32.lib /nologo /dll /pdb:none /machine:I386 /fixed:no /release - !ELSEIF "$(CFG)" == "libcurl - Win32 LIB Debug" # PROP BASE Use_MFC 0 @@ -360,8 +296,8 @@ LINK32=link.exe # PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug\lib" # PROP Target_Dir "" CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /EHsc /GZ /c +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "WIN32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "WIN32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /EHsc /GZ /c RSC=rc.exe # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" @@ -385,8 +321,8 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL\lib" # PROP Target_Dir "" CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_SSLEAY" /D "USE_OPENSSL" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_SSLEAY" /D "USE_OPENSSL" /FD /EHsc /GZ /c +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "WIN32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_SSLEAY" /D "USE_OPENSSL" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "WIN32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_SSLEAY" /D "USE_OPENSSL" /FD /EHsc /GZ /c RSC=rc.exe # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" @@ -410,8 +346,8 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2\lib" # PROP Target_Dir "" CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_SSLEAY" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_SSLEAY" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "WIN32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_SSLEAY" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "WIN32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_SSLEAY" /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" @@ -435,8 +371,8 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI\lib" # PROP Target_Dir "" CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_WINDOWS_SSPI" /D "USE_SCHANNEL" /FD /EHsc /GZ /c +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "WIN32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "WIN32" /D "_DEBUG" /D "BUILDING_LIBCURL" /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" @@ -447,31 +383,6 @@ 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 /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /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 /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /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 @@ -485,8 +396,8 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL\lib" # PROP Target_Dir "" CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_SSLEAY" /D "USE_OPENSSL" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_SSLEAY" /D "USE_OPENSSL" /FD /EHsc /GZ /c +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "WIN32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_SSLEAY" /D "USE_OPENSSL" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "WIN32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_SSLEAY" /D "USE_OPENSSL" /FD /EHsc /GZ /c RSC=rc.exe # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" @@ -510,8 +421,8 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2\lib" # PROP Target_Dir "" CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_SSLEAY" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_SSLEAY" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "WIN32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_SSLEAY" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "WIN32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_SSLEAY" /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" @@ -535,8 +446,8 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release\lib" # PROP Target_Dir "" CPP=cl.exe -# ADD BASE CPP /nologo /MD /W3 /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 /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /EHsc /c +# ADD BASE CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "WIN32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /EHsc /c +# ADD CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "WIN32" /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" @@ -560,8 +471,8 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL\lib" # PROP Target_Dir "" CPP=cl.exe -# ADD BASE CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_SSLEAY" /D "USE_OPENSSL" /FD /EHsc /c -# ADD CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_SSLEAY" /D "USE_OPENSSL" /FD /EHsc /c +# ADD BASE CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "WIN32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_SSLEAY" /D "USE_OPENSSL" /FD /EHsc /c +# ADD CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "WIN32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_SSLEAY" /D "USE_OPENSSL" /FD /EHsc /c RSC=rc.exe # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" @@ -585,8 +496,8 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2\lib" # PROP Target_Dir "" CPP=cl.exe -# ADD BASE CPP /nologo /MD /W3 /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_SSLEAY" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c -# ADD CPP /nologo /MD /W3 /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_SSLEAY" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c +# ADD BASE CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "WIN32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_SSLEAY" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c +# ADD CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "WIN32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_SSLEAY" /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" @@ -610,33 +521,8 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI\lib" # PROP Target_Dir "" CPP=cl.exe -# ADD BASE CPP /nologo /MD /W3 /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 /W3 /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 /W3 /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 /W3 /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 BASE CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "WIN32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /EHsc /c +# ADD CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "WIN32" /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" @@ -660,8 +546,8 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL\lib" # PROP Target_Dir "" CPP=cl.exe -# ADD BASE CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_SSLEAY" /D "USE_OPENSSL" /FD /EHsc /c -# ADD CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_SSLEAY" /D "USE_OPENSSL" /FD /EHsc /c +# ADD BASE CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "WIN32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_SSLEAY" /D "USE_OPENSSL" /FD /EHsc /c +# ADD CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "WIN32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_SSLEAY" /D "USE_OPENSSL" /FD /EHsc /c RSC=rc.exe # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" @@ -685,8 +571,8 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2\lib" # PROP Target_Dir "" CPP=cl.exe -# ADD BASE CPP /nologo /MD /W3 /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_SSLEAY" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c -# ADD CPP /nologo /MD /W3 /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_SSLEAY" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c +# ADD BASE CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "WIN32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_SSLEAY" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c +# ADD CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "WIN32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_SSLEAY" /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" @@ -705,24 +591,20 @@ LIB32=link.exe -lib # 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" diff --git a/projects/Windows/VC6/src/curlsrc.tmpl b/projects/Windows/VC6/src/curlsrc.tmpl index 4249db0..2ff6f94 100644 --- a/projects/Windows/VC6/src/curlsrc.tmpl +++ b/projects/Windows/VC6/src/curlsrc.tmpl @@ -21,24 +21,20 @@ CFG=curlsrc - Win32 LIB Debug !MESSAGE "curlsrc - Win32 DLL Debug DLL OpenSSL" (based on "Win32 (x86) Console Application") !MESSAGE "curlsrc - Win32 DLL Debug DLL OpenSSL DLL LibSSH2" (based on "Win32 (x86) Console Application") !MESSAGE "curlsrc - Win32 DLL Debug DLL Windows SSPI" (based on "Win32 (x86) Console Application") -!MESSAGE "curlsrc - Win32 DLL Debug DLL Windows SSPI DLL WinIDN" (based on "Win32 (x86) Console Application") !MESSAGE "curlsrc - Win32 DLL Release" (based on "Win32 (x86) Console Application") !MESSAGE "curlsrc - Win32 DLL Release DLL OpenSSL" (based on "Win32 (x86) Console Application") !MESSAGE "curlsrc - Win32 DLL Release DLL OpenSSL DLL LibSSH2" (based on "Win32 (x86) Console Application") !MESSAGE "curlsrc - Win32 DLL Release DLL Windows SSPI" (based on "Win32 (x86) Console Application") -!MESSAGE "curlsrc - Win32 DLL Release DLL Windows SSPI DLL WinIDN" (based on "Win32 (x86) Console Application") !MESSAGE "curlsrc - Win32 LIB Debug" (based on "Win32 (x86) Console Application") !MESSAGE "curlsrc - Win32 LIB Debug DLL OpenSSL" (based on "Win32 (x86) Console Application") !MESSAGE "curlsrc - Win32 LIB Debug DLL OpenSSL DLL LibSSH2" (based on "Win32 (x86) Console Application") !MESSAGE "curlsrc - Win32 LIB Debug DLL Windows SSPI" (based on "Win32 (x86) Console Application") -!MESSAGE "curlsrc - Win32 LIB Debug DLL Windows SSPI DLL WinIDN" (based on "Win32 (x86) Console Application") !MESSAGE "curlsrc - Win32 LIB Debug LIB OpenSSL" (based on "Win32 (x86) Console Application") !MESSAGE "curlsrc - Win32 LIB Debug LIB OpenSSL LIB LibSSH2" (based on "Win32 (x86) Console Application") !MESSAGE "curlsrc - Win32 LIB Release" (based on "Win32 (x86) Console Application") !MESSAGE "curlsrc - Win32 LIB Release DLL OpenSSL" (based on "Win32 (x86) Console Application") !MESSAGE "curlsrc - Win32 LIB Release DLL OpenSSL DLL LibSSH2" (based on "Win32 (x86) Console Application") !MESSAGE "curlsrc - Win32 LIB Release DLL Windows SSPI" (based on "Win32 (x86) Console Application") -!MESSAGE "curlsrc - Win32 LIB Release DLL Windows SSPI DLL WinIDN" (based on "Win32 (x86) Console Application") !MESSAGE "curlsrc - Win32 LIB Release LIB OpenSSL" (based on "Win32 (x86) Console Application") !MESSAGE "curlsrc - Win32 LIB Release LIB OpenSSL LIB LibSSH2" (based on "Win32 (x86) Console Application") !MESSAGE @@ -63,8 +59,8 @@ RSC=rc.exe # PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug\src" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_CONSOLE" /D "_DEBUG" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /FD /EHsc /GZ /c +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_CONSOLE" /D "WIN32" /D "_DEBUG" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /EHsc /GZ /c # ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" # ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" BSC32=bscmake.exe @@ -88,8 +84,8 @@ LINK32=link.exe # PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL\src" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /FD /EHsc /GZ /c +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /EHsc /GZ /c # ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" # ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" BSC32=bscmake.exe @@ -113,8 +109,8 @@ LINK32=link.exe # 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 /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /FD /EHsc /GZ /c +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /EHsc /GZ /c # ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" # ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" BSC32=bscmake.exe @@ -138,8 +134,8 @@ LINK32=link.exe # 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 /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /FD /EHsc /GZ /c +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /EHsc /GZ /c # ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" # ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" BSC32=bscmake.exe @@ -149,31 +145,6 @@ 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)" == "curlsrc - 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 /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /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)" == "curlsrc - Win32 DLL Release" # PROP BASE Use_MFC 0 @@ -187,8 +158,8 @@ LINK32=link.exe # PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release\src" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_CONSOLE" /D "NDEBUG" /FD /EHsc /c -# ADD CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /FD /EHsc /c +# ADD BASE CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_CONSOLE" /D "WIN32" /D "NDEBUG" /FD /EHsc /c +# ADD CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /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 @@ -212,8 +183,8 @@ LINK32=link.exe # PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL\src" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /FD /EHsc /c -# ADD CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /FD /EHsc /c +# ADD BASE CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /EHsc /c +# ADD CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /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 @@ -237,8 +208,8 @@ LINK32=link.exe # 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 /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /FD /EHsc /c -# ADD CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /FD /EHsc /c +# ADD BASE CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /EHsc /c +# ADD CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /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 @@ -262,8 +233,8 @@ LINK32=link.exe # 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 /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /FD /EHsc /c -# ADD CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /FD /EHsc /c +# ADD BASE CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /EHsc /c +# ADD CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /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 @@ -273,31 +244,6 @@ 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)" == "curlsrc - 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 /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /FD /EHsc /c -# ADD CPP /nologo /MD /W3 /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)" == "curlsrc - Win32 LIB Debug" # PROP BASE Use_MFC 0 @@ -311,8 +257,8 @@ LINK32=link.exe # PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug\src" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_CONSOLE" /D "_DEBUG" /D "CURL_STATICLIB" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /GZ /c +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_CONSOLE" /D "WIN32" /D "_DEBUG" /D "CURL_STATICLIB" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /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 @@ -336,8 +282,8 @@ LINK32=link.exe # PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL\src" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /GZ /c +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /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 @@ -361,8 +307,8 @@ LINK32=link.exe # 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 /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /GZ /c +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /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 @@ -386,8 +332,8 @@ LINK32=link.exe # 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 /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /GZ /c +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /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 @@ -397,31 +343,6 @@ 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 - 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 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)" == "curlsrc - 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 /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /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 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 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)" == "curlsrc - Win32 LIB Debug LIB OpenSSL" # PROP BASE Use_MFC 0 @@ -436,8 +357,8 @@ LINK32=link.exe # PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL\src" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /GZ /c +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /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 @@ -461,8 +382,8 @@ LINK32=link.exe # 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 /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /GZ /c +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /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 @@ -485,8 +406,8 @@ LINK32=link.exe # PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release\src" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /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 /W3 /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 CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_CONSOLE" /D "WIN32" /D "NDEBUG" /D "CURL_STATICLIB" /FD /EHsc /c +# ADD CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /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 @@ -510,8 +431,8 @@ LINK32=link.exe # PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL\src" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /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 /W3 /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 CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /c +# ADD CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /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 @@ -535,8 +456,8 @@ LINK32=link.exe # 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 /W3 /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 /W3 /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 CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /c +# ADD CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /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 @@ -560,8 +481,8 @@ LINK32=link.exe # 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 /W3 /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 /W3 /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 CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /c +# ADD CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /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 @@ -571,31 +492,6 @@ 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 - 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 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)" == "curlsrc - 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 /W3 /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 /W3 /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 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 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)" == "curlsrc - Win32 LIB Release LIB OpenSSL" # PROP BASE Use_MFC 0 @@ -610,8 +506,8 @@ LINK32=link.exe # PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL\src" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /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 /W3 /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 CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /c +# ADD CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /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 @@ -635,8 +531,8 @@ LINK32=link.exe # 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 /W3 /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 /W3 /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 CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /c +# ADD CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "WIN32" /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 @@ -654,24 +550,20 @@ LINK32=link.exe # Name "curlsrc - Win32 DLL Debug DLL OpenSSL" # Name "curlsrc - Win32 DLL Debug DLL OpenSSL DLL LibSSH2" # Name "curlsrc - Win32 DLL Debug DLL Windows SSPI" -# Name "curlsrc - Win32 DLL Debug DLL Windows SSPI DLL WinIDN" # Name "curlsrc - Win32 DLL Release" # Name "curlsrc - Win32 DLL Release DLL OpenSSL" # Name "curlsrc - Win32 DLL Release DLL OpenSSL DLL LibSSH2" # Name "curlsrc - Win32 DLL Release DLL Windows SSPI" -# Name "curlsrc - Win32 DLL Release DLL Windows SSPI DLL WinIDN" # Name "curlsrc - Win32 LIB Debug" # Name "curlsrc - Win32 LIB Debug DLL OpenSSL" # Name "curlsrc - Win32 LIB Debug DLL OpenSSL DLL LibSSH2" # Name "curlsrc - Win32 LIB Debug DLL Windows SSPI" -# Name "curlsrc - Win32 LIB Debug DLL Windows SSPI DLL WinIDN" # Name "curlsrc - Win32 LIB Debug LIB OpenSSL" # Name "curlsrc - Win32 LIB Debug LIB OpenSSL LIB LibSSH2" # Name "curlsrc - Win32 LIB Release" # Name "curlsrc - Win32 LIB Release DLL OpenSSL" # Name "curlsrc - Win32 LIB Release DLL OpenSSL DLL LibSSH2" # Name "curlsrc - Win32 LIB Release DLL Windows SSPI" -# Name "curlsrc - Win32 LIB Release DLL Windows SSPI DLL WinIDN" # Name "curlsrc - Win32 LIB Release LIB OpenSSL" # Name "curlsrc - Win32 LIB Release LIB OpenSSL LIB LibSSH2" # Begin Group "Source Files" diff --git a/projects/Windows/VC7.1/curl.sln b/projects/Windows/VC7.1/curl.sln index 4475c77..158bf89 100644 --- a/projects/Windows/VC7.1/curl.sln +++ b/projects/Windows/VC7.1/curl.sln @@ -14,24 +14,20 @@ Global DLL Debug - DLL OpenSSL = DLL Debug - DLL OpenSSL DLL Debug - DLL OpenSSL - DLL LibSSH2 = DLL Debug - DLL OpenSSL - DLL LibSSH2 DLL Debug - DLL Windows SSPI = DLL Debug - DLL Windows SSPI - DLL Debug - DLL Windows SSPI - DLL WinIDN = DLL Debug - DLL Windows SSPI - DLL WinIDN DLL Release = DLL Release DLL Release - DLL OpenSSL = DLL Release - DLL OpenSSL DLL Release - DLL OpenSSL - DLL LibSSH2 = DLL Release - DLL OpenSSL - DLL LibSSH2 DLL Release - DLL Windows SSPI = DLL Release - DLL Windows SSPI - DLL Release - DLL Windows SSPI - DLL WinIDN = DLL Release - DLL Windows SSPI - DLL WinIDN LIB Debug = LIB Debug LIB Debug - DLL OpenSSL = LIB Debug - DLL OpenSSL LIB Debug - DLL OpenSSL - DLL LibSSH2 = LIB Debug - DLL OpenSSL - DLL LibSSH2 LIB Debug - DLL Windows SSPI = LIB Debug - DLL Windows SSPI - LIB Debug - DLL Windows SSPI - DLL WinIDN = LIB Debug - DLL Windows SSPI - DLL WinIDN LIB Debug - LIB OpenSSL = LIB Debug - LIB OpenSSL LIB Debug - LIB OpenSSL - LIB LibSSH2 = LIB Debug - LIB OpenSSL - LIB LibSSH2 LIB Release = LIB Release LIB Release - DLL OpenSSL = LIB Release - DLL OpenSSL LIB Release - DLL OpenSSL - DLL LibSSH2 = LIB Release - DLL OpenSSL - DLL LibSSH2 LIB Release - DLL Windows SSPI = LIB Release - DLL Windows SSPI - LIB Release - DLL Windows SSPI - DLL WinIDN = LIB Release - DLL Windows SSPI - DLL WinIDN LIB Release - LIB OpenSSL = LIB Release - LIB OpenSSL LIB Release - LIB OpenSSL - LIB LibSSH2 = LIB Release - LIB OpenSSL - LIB LibSSH2 EndGlobalSection @@ -44,8 +40,6 @@ Global {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI.Build.0 = DLL Debug - DLL Windows SSPI|Win32 - {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 - {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release.ActiveCfg = DLL Release|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release.Build.0 = DLL Release|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL.ActiveCfg = DLL Release - DLL OpenSSL|Win32 @@ -54,8 +48,6 @@ Global {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI.ActiveCfg = DLL Release - DLL Windows SSPI|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI.Build.0 = DLL Release - DLL Windows SSPI|Win32 - {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 - {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug.ActiveCfg = LIB Debug|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug.Build.0 = LIB Debug|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL.ActiveCfg = LIB Debug - DLL OpenSSL|Win32 @@ -64,8 +56,6 @@ Global {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI.Build.0 = LIB Debug - DLL Windows SSPI|Win32 - {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 - {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL.ActiveCfg = LIB Debug - LIB OpenSSL|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL.Build.0 = LIB Debug - LIB OpenSSL|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 @@ -78,8 +68,6 @@ Global {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI.ActiveCfg = LIB Release - DLL Windows SSPI|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI.Build.0 = LIB Release - DLL Windows SSPI|Win32 - {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 - {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL.ActiveCfg = LIB Release - LIB OpenSSL|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL.Build.0 = LIB Release - LIB OpenSSL|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 @@ -92,8 +80,6 @@ Global {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI.Build.0 = DLL Debug - DLL Windows SSPI|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release.ActiveCfg = DLL Release|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release.Build.0 = DLL Release|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL.ActiveCfg = DLL Release - DLL OpenSSL|Win32 @@ -102,8 +88,6 @@ Global {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI.ActiveCfg = DLL Release - DLL Windows SSPI|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI.Build.0 = DLL Release - DLL Windows SSPI|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug.ActiveCfg = LIB Debug|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug.Build.0 = LIB Debug|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL.ActiveCfg = LIB Debug - DLL OpenSSL|Win32 @@ -112,8 +96,6 @@ Global {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI.Build.0 = LIB Debug - DLL Windows SSPI|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL.ActiveCfg = LIB Debug - LIB OpenSSL|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL.Build.0 = LIB Debug - LIB OpenSSL|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 @@ -126,8 +108,6 @@ Global {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI.ActiveCfg = LIB Release - DLL Windows SSPI|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI.Build.0 = LIB Release - DLL Windows SSPI|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL.ActiveCfg = LIB Release - LIB OpenSSL|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL.Build.0 = LIB Release - LIB OpenSSL|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 diff --git a/projects/Windows/VC7.1/lib/libcurl.sln b/projects/Windows/VC7.1/lib/libcurl.sln index 7513d35..9c98f65 100644 --- a/projects/Windows/VC7.1/lib/libcurl.sln +++ b/projects/Windows/VC7.1/lib/libcurl.sln @@ -9,24 +9,20 @@ Global DLL Debug - DLL OpenSSL = DLL Debug - DLL OpenSSL DLL Debug - DLL OpenSSL - DLL LibSSH2 = DLL Debug - DLL OpenSSL - DLL LibSSH2 DLL Debug - DLL Windows SSPI = DLL Debug - DLL Windows SSPI - DLL Debug - DLL Windows SSPI - DLL WinIDN = DLL Debug - DLL Windows SSPI - DLL WinIDN DLL Release = DLL Release DLL Release - DLL OpenSSL = DLL Release - DLL OpenSSL DLL Release - DLL OpenSSL - DLL LibSSH2 = DLL Release - DLL OpenSSL - DLL LibSSH2 DLL Release - DLL Windows SSPI = DLL Release - DLL Windows SSPI - DLL Release - DLL Windows SSPI - DLL WinIDN = DLL Release - DLL Windows SSPI - DLL WinIDN LIB Debug = LIB Debug LIB Debug - DLL OpenSSL = LIB Debug - DLL OpenSSL LIB Debug - DLL OpenSSL - DLL LibSSH2 = LIB Debug - DLL OpenSSL - DLL LibSSH2 LIB Debug - DLL Windows SSPI = LIB Debug - DLL Windows SSPI - LIB Debug - DLL Windows SSPI - DLL WinIDN = LIB Debug - DLL Windows SSPI - DLL WinIDN LIB Debug - LIB OpenSSL = LIB Debug - LIB OpenSSL LIB Debug - LIB OpenSSL - LIB LibSSH2 = LIB Debug - LIB OpenSSL - LIB LibSSH2 LIB Release = LIB Release LIB Release - DLL OpenSSL = LIB Release - DLL OpenSSL LIB Release - DLL OpenSSL - DLL LibSSH2 = LIB Release - DLL OpenSSL - DLL LibSSH2 LIB Release - DLL Windows SSPI = LIB Release - DLL Windows SSPI - LIB Release - DLL Windows SSPI - DLL WinIDN = LIB Release - DLL Windows SSPI - DLL WinIDN LIB Release - LIB OpenSSL = LIB Release - LIB OpenSSL LIB Release - LIB OpenSSL - LIB LibSSH2 = LIB Release - LIB OpenSSL - LIB LibSSH2 EndGlobalSection @@ -39,8 +35,6 @@ Global {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI.Build.0 = DLL Debug - DLL Windows SSPI|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release.ActiveCfg = DLL Release|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release.Build.0 = DLL Release|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL.ActiveCfg = DLL Release - DLL OpenSSL|Win32 @@ -49,8 +43,6 @@ Global {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI.ActiveCfg = DLL Release - DLL Windows SSPI|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI.Build.0 = DLL Release - DLL Windows SSPI|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug.ActiveCfg = LIB Debug|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug.Build.0 = LIB Debug|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL.ActiveCfg = LIB Debug - DLL OpenSSL|Win32 @@ -59,8 +51,6 @@ Global {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI.Build.0 = LIB Debug - DLL Windows SSPI|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL.ActiveCfg = LIB Debug - LIB OpenSSL|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL.Build.0 = LIB Debug - LIB OpenSSL|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 @@ -73,8 +63,6 @@ Global {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI.ActiveCfg = LIB Release - DLL Windows SSPI|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI.Build.0 = LIB Release - DLL Windows SSPI|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL.ActiveCfg = LIB Release - LIB OpenSSL|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL.Build.0 = LIB Release - LIB OpenSSL|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 diff --git a/projects/Windows/VC7.1/lib/libcurl.tmpl b/projects/Windows/VC7.1/lib/libcurl.tmpl index a52f3f9..66414e2 100644 --- a/projects/Windows/VC7.1/lib/libcurl.tmpl +++ b/projects/Windows/VC7.1/lib/libcurl.tmpl @@ -23,7 +23,7 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" + PreprocessorDefinitions="WIN32;NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" @@ -81,7 +81,7 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL" + PreprocessorDefinitions="WIN32;_DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL" BasicRuntimeChecks="3" RuntimeLibrary="3" WarningLevel="3" @@ -140,7 +140,7 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL" + PreprocessorDefinitions="WIN32;_DEBUG;BUILDING_LIBCURL" BasicRuntimeChecks="3" RuntimeLibrary="3" WarningLevel="3" @@ -198,7 +198,7 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL" + PreprocessorDefinitions="WIN32,NDEBUG,BUILDING_LIBCURL,CURL_STATICLIB,USE_SSLEAY,USE_OPENSSL" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" @@ -245,7 +245,7 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" + PreprocessorDefinitions="WIN32,_DEBUG,BUILDING_LIBCURL,CURL_STATICLIB,USE_SSLEAY,USE_OPENSSL,USE_LIBSSH2,HAVE_LIBSSH2_H" BasicRuntimeChecks="3" RuntimeLibrary="3" WarningLevel="3" @@ -292,7 +292,7 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL" + PreprocessorDefinitions="WIN32;NDEBUG;BUILDING_LIBCURL" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" @@ -349,7 +349,7 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" + PreprocessorDefinitions="WIN32,_DEBUG,BUILDING_LIBCURL,CURL_STATICLIB,USE_SSLEAY,USE_OPENSSL,USE_LIBSSH2,HAVE_LIBSSH2_H" BasicRuntimeChecks="3" RuntimeLibrary="3" WarningLevel="3" @@ -396,7 +396,7 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL" + PreprocessorDefinitions="WIN32,_DEBUG,BUILDING_LIBCURL,CURL_STATICLIB,USE_WINDOWS_SSPI,USE_SCHANNEL" BasicRuntimeChecks="3" RuntimeLibrary="3" WarningLevel="3" @@ -443,7 +443,7 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL" + PreprocessorDefinitions="WIN32,_DEBUG,BUILDING_LIBCURL,CURL_STATICLIB,USE_SSLEAY,USE_OPENSSL" BasicRuntimeChecks="3" RuntimeLibrary="3" WarningLevel="3" @@ -490,7 +490,7 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL" + PreprocessorDefinitions="WIN32;NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" @@ -547,7 +547,7 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL" + PreprocessorDefinitions="WIN32;_DEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL" BasicRuntimeChecks="3" RuntimeLibrary="3" WarningLevel="3" @@ -605,7 +605,7 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL" + PreprocessorDefinitions="WIN32,NDEBUG,BUILDING_LIBCURL,CURL_STATICLIB,USE_WINDOWS_SSPI,USE_SCHANNEL" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" @@ -652,7 +652,7 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL" + PreprocessorDefinitions="WIN32;NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" @@ -710,7 +710,7 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL" + PreprocessorDefinitions="WIN32,NDEBUG,BUILDING_LIBCURL,CURL_STATICLIB,USE_SSLEAY,USE_OPENSSL" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" @@ -757,7 +757,7 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB" + PreprocessorDefinitions="WIN32,NDEBUG,BUILDING_LIBCURL,CURL_STATICLIB" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" @@ -804,7 +804,7 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" + PreprocessorDefinitions="WIN32,NDEBUG,BUILDING_LIBCURL,CURL_STATICLIB,USE_SSLEAY,USE_OPENSSL,USE_LIBSSH2,HAVE_LIBSSH2_H" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" @@ -851,7 +851,7 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" + PreprocessorDefinitions="WIN32,NDEBUG,BUILDING_LIBCURL,CURL_STATICLIB,USE_SSLEAY,USE_OPENSSL,USE_LIBSSH2,HAVE_LIBSSH2_H" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" @@ -898,7 +898,7 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB" + PreprocessorDefinitions="WIN32,_DEBUG,BUILDING_LIBCURL,CURL_STATICLIB" BasicRuntimeChecks="3" RuntimeLibrary="3" WarningLevel="3" @@ -945,7 +945,7 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" + PreprocessorDefinitions="WIN32;_DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" BasicRuntimeChecks="3" RuntimeLibrary="3" WarningLevel="3" @@ -1004,7 +1004,7 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL" + PreprocessorDefinitions="WIN32,_DEBUG,BUILDING_LIBCURL,CURL_STATICLIB,USE_SSLEAY,USE_OPENSSL" BasicRuntimeChecks="3" RuntimeLibrary="3" WarningLevel="3" @@ -1039,215 +1039,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/projects/Windows/VC7.1/src/curlsrc.sln b/projects/Windows/VC7.1/src/curlsrc.sln index cba3b60..058cc1f 100644 --- a/projects/Windows/VC7.1/src/curlsrc.sln +++ b/projects/Windows/VC7.1/src/curlsrc.sln @@ -9,24 +9,20 @@ Global DLL Debug - DLL OpenSSL = DLL Debug - DLL OpenSSL DLL Debug - DLL OpenSSL - DLL LibSSH2 = DLL Debug - DLL OpenSSL - DLL LibSSH2 DLL Debug - DLL Windows SSPI = DLL Debug - DLL Windows SSPI - DLL Debug - DLL Windows SSPI - DLL WinIDN = DLL Debug - DLL Windows SSPI - DLL WinIDN DLL Release = DLL Release DLL Release - DLL OpenSSL = DLL Release - DLL OpenSSL DLL Release - DLL OpenSSL - DLL LibSSH2 = DLL Release - DLL OpenSSL - DLL LibSSH2 DLL Release - DLL Windows SSPI = DLL Release - DLL Windows SSPI - DLL Release - DLL Windows SSPI - DLL WinIDN = DLL Release - DLL Windows SSPI - DLL WinIDN LIB Debug = LIB Debug LIB Debug - DLL OpenSSL = LIB Debug - DLL OpenSSL LIB Debug - DLL OpenSSL - DLL LibSSH2 = LIB Debug - DLL OpenSSL - DLL LibSSH2 LIB Debug - DLL Windows SSPI = LIB Debug - DLL Windows SSPI - LIB Debug - DLL Windows SSPI - DLL WinIDN = LIB Debug - DLL Windows SSPI - DLL WinIDN LIB Debug - LIB OpenSSL = LIB Debug - LIB OpenSSL LIB Debug - LIB OpenSSL - LIB LibSSH2 = LIB Debug - LIB OpenSSL - LIB LibSSH2 LIB Release = LIB Release LIB Release - DLL OpenSSL = LIB Release - DLL OpenSSL LIB Release - DLL OpenSSL - DLL LibSSH2 = LIB Release - DLL OpenSSL - DLL LibSSH2 LIB Release - DLL Windows SSPI = LIB Release - DLL Windows SSPI - LIB Release - DLL Windows SSPI - DLL WinIDN = LIB Release - DLL Windows SSPI - DLL WinIDN LIB Release - LIB OpenSSL = LIB Release - LIB OpenSSL LIB Release - LIB OpenSSL - LIB LibSSH2 = LIB Release - LIB OpenSSL - LIB LibSSH2 EndGlobalSection @@ -39,8 +35,6 @@ Global {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI.Build.0 = DLL Debug - DLL Windows SSPI|Win32 - {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 - {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release.ActiveCfg = DLL Release|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release.Build.0 = DLL Release|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL.ActiveCfg = DLL Release - DLL OpenSSL|Win32 @@ -49,8 +43,6 @@ Global {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI.ActiveCfg = DLL Release - DLL Windows SSPI|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI.Build.0 = DLL Release - DLL Windows SSPI|Win32 - {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 - {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug.ActiveCfg = LIB Debug|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug.Build.0 = LIB Debug|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL.ActiveCfg = LIB Debug - DLL OpenSSL|Win32 @@ -59,8 +51,6 @@ Global {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI.Build.0 = LIB Debug - DLL Windows SSPI|Win32 - {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 - {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL.ActiveCfg = LIB Debug - LIB OpenSSL|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL.Build.0 = LIB Debug - LIB OpenSSL|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 @@ -73,8 +63,6 @@ Global {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI.ActiveCfg = LIB Release - DLL Windows SSPI|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI.Build.0 = LIB Release - DLL Windows SSPI|Win32 - {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 - {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL.ActiveCfg = LIB Release - LIB OpenSSL|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL.Build.0 = LIB Release - LIB OpenSSL|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 diff --git a/projects/Windows/VC7.1/src/curlsrc.tmpl b/projects/Windows/VC7.1/src/curlsrc.tmpl index db6546e..5443615 100644 --- a/projects/Windows/VC7.1/src/curlsrc.tmpl +++ b/projects/Windows/VC7.1/src/curlsrc.tmpl @@ -22,10 +22,13 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE,CURL_STATICLIB" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" CompileAs="0"/> @@ -77,10 +80,13 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="NDEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" CompileAs="0"/> @@ -132,10 +138,13 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE,CURL_STATICLIB" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" CompileAs="0"/> @@ -187,9 +196,12 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32,_DEBUG,_CONSOLE,CURL_STATICLIB" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" DebugInformationFormat="3" @@ -244,9 +256,12 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32,_DEBUG,_CONSOLE,CURL_STATICLIB" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" DebugInformationFormat="3" @@ -301,9 +316,12 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="_DEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32,_DEBUG,_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" DebugInformationFormat="3" @@ -358,9 +376,12 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32,_DEBUG,_CONSOLE,CURL_STATICLIB" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" DebugInformationFormat="3" @@ -415,10 +436,13 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE,CURL_STATICLIB" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" CompileAs="0"/> @@ -470,10 +494,13 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE,CURL_STATICLIB" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" CompileAs="0"/> @@ -525,10 +552,13 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE,CURL_STATICLIB" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" CompileAs="0"/> @@ -580,10 +610,13 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE,CURL_STATICLIB" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" CompileAs="0"/> @@ -635,9 +668,12 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32,_DEBUG,_CONSOLE,CURL_STATICLIB" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" DebugInformationFormat="3" @@ -692,9 +728,12 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32,_DEBUG,_CONSOLE,CURL_STATICLIB" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" DebugInformationFormat="3" @@ -749,9 +788,12 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="_DEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32,_DEBUG,_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" DebugInformationFormat="3" @@ -806,10 +848,13 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="NDEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" CompileAs="0"/> @@ -861,10 +906,13 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="NDEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" CompileAs="0"/> @@ -916,9 +964,12 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="_DEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32,_DEBUG,_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" DebugInformationFormat="3" @@ -973,9 +1024,12 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32,_DEBUG,_CONSOLE,CURL_STATICLIB" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" DebugInformationFormat="3" @@ -1030,10 +1084,13 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="NDEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" CompileAs="0"/> @@ -1085,9 +1142,12 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="_DEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32,_DEBUG,_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" DebugInformationFormat="3" @@ -1130,230 +1190,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/projects/Windows/VC7/curl.sln b/projects/Windows/VC7/curl.sln index fb7b89a..ae6ee77 100644 --- a/projects/Windows/VC7/curl.sln +++ b/projects/Windows/VC7/curl.sln @@ -9,26 +9,22 @@ Global ConfigName.1 = DLL Debug - DLL OpenSSL ConfigName.2 = DLL Debug - DLL OpenSSL - DLL LibSSH2 ConfigName.3 = DLL Debug - DLL Windows SSPI - ConfigName.4 = DLL Debug - DLL Windows SSPI - DLL WinIDN - ConfigName.5 = DLL Release - ConfigName.6 = DLL Release - DLL OpenSSL - ConfigName.7 = DLL Release - DLL OpenSSL - DLL LibSSH2 - ConfigName.8 = DLL Release - DLL Windows SSPI - ConfigName.9 = DLL Release - DLL Windows SSPI - DLL WinIDN - ConfigName.10 = LIB Debug - ConfigName.11 = LIB Debug - DLL OpenSSL - ConfigName.12 = LIB Debug - DLL OpenSSL - DLL LibSSH2 - ConfigName.13 = LIB Debug - DLL Windows SSPI - ConfigName.14 = LIB Debug - DLL Windows SSPI - DLL WinIDN - ConfigName.15 = LIB Debug - LIB OpenSSL - ConfigName.16 = LIB Debug - LIB OpenSSL - LIB LibSSH2 - ConfigName.17 = LIB Release - ConfigName.18 = LIB Release - DLL OpenSSL - ConfigName.19 = LIB Release - DLL OpenSSL - DLL LibSSH2 - ConfigName.20 = LIB Release - DLL Windows SSPI - ConfigName.21 = LIB Release - DLL Windows SSPI - DLL WinIDN - ConfigName.22 = LIB Release - LIB OpenSSL - ConfigName.23 = LIB Release - LIB OpenSSL - LIB LibSSH2 + ConfigName.4 = DLL Release + ConfigName.5 = DLL Release - DLL OpenSSL + ConfigName.6 = DLL Release - DLL OpenSSL - DLL LibSSH2 + ConfigName.7 = DLL Release - DLL Windows SSPI + ConfigName.8 = LIB Debug + ConfigName.9 = LIB Debug - DLL OpenSSL + ConfigName.10 = LIB Debug - DLL OpenSSL - DLL LibSSH2 + ConfigName.11 = LIB Debug - DLL Windows SSPI + ConfigName.12 = LIB Debug - LIB OpenSSL + ConfigName.13 = LIB Debug - LIB OpenSSL - LIB LibSSH2 + ConfigName.14 = LIB Release + ConfigName.15 = LIB Release - DLL OpenSSL + ConfigName.16 = LIB Release - DLL OpenSSL - DLL LibSSH2 + ConfigName.17 = LIB Release - DLL Windows SSPI + ConfigName.18 = LIB Release - LIB OpenSSL + ConfigName.19 = LIB Release - LIB OpenSSL - LIB LibSSH2 EndGlobalSection GlobalSection(ProjectDependencies) = postSolution {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.0 = {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB} @@ -42,8 +38,6 @@ Global {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI.Build.0 = DLL Debug - DLL Windows SSPI|Win32 - {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 - {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release.ActiveCfg = DLL Release|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release.Build.0 = DLL Release|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL.ActiveCfg = DLL Release - DLL OpenSSL|Win32 @@ -52,8 +46,6 @@ Global {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI.ActiveCfg = DLL Release - DLL Windows SSPI|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI.Build.0 = DLL Release - DLL Windows SSPI|Win32 - {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 - {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug.ActiveCfg = LIB Debug|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug.Build.0 = LIB Debug|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL.ActiveCfg = LIB Debug - DLL OpenSSL|Win32 @@ -62,8 +54,6 @@ Global {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI.Build.0 = LIB Debug - DLL Windows SSPI|Win32 - {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 - {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL.ActiveCfg = LIB Debug - LIB OpenSSL|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL.Build.0 = LIB Debug - LIB OpenSSL|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 @@ -76,8 +66,6 @@ Global {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI.ActiveCfg = LIB Release - DLL Windows SSPI|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI.Build.0 = LIB Release - DLL Windows SSPI|Win32 - {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 - {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL.ActiveCfg = LIB Release - LIB OpenSSL|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL.Build.0 = LIB Release - LIB OpenSSL|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 @@ -90,8 +78,6 @@ Global {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI.Build.0 = DLL Debug - DLL Windows SSPI|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release.ActiveCfg = DLL Release|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release.Build.0 = DLL Release|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL.ActiveCfg = DLL Release - DLL OpenSSL|Win32 @@ -100,8 +86,6 @@ Global {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI.ActiveCfg = DLL Release - DLL Windows SSPI|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI.Build.0 = DLL Release - DLL Windows SSPI|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug.ActiveCfg = LIB Debug|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug.Build.0 = LIB Debug|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL.ActiveCfg = LIB Debug - DLL OpenSSL|Win32 @@ -110,8 +94,6 @@ Global {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI.Build.0 = LIB Debug - DLL Windows SSPI|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL.ActiveCfg = LIB Debug - LIB OpenSSL|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL.Build.0 = LIB Debug - LIB OpenSSL|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 @@ -124,8 +106,6 @@ Global {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI.ActiveCfg = LIB Release - DLL Windows SSPI|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI.Build.0 = LIB Release - DLL Windows SSPI|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL.ActiveCfg = LIB Release - LIB OpenSSL|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL.Build.0 = LIB Release - LIB OpenSSL|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 diff --git a/projects/Windows/VC7/lib/libcurl.sln b/projects/Windows/VC7/lib/libcurl.sln index f092661..bf152ff 100644 --- a/projects/Windows/VC7/lib/libcurl.sln +++ b/projects/Windows/VC7/lib/libcurl.sln @@ -7,26 +7,22 @@ Global ConfigName.1 = DLL Debug - DLL OpenSSL ConfigName.2 = DLL Debug - DLL OpenSSL - DLL LibSSH2 ConfigName.3 = DLL Debug - DLL Windows SSPI - ConfigName.4 = DLL Debug - DLL Windows SSPI - DLL WinIDN - ConfigName.5 = DLL Release - ConfigName.6 = DLL Release - DLL OpenSSL - ConfigName.7 = DLL Release - DLL OpenSSL - DLL LibSSH2 - ConfigName.8 = DLL Release - DLL Windows SSPI - ConfigName.9 = DLL Release - DLL Windows SSPI - DLL WinIDN - ConfigName.10 = LIB Debug - ConfigName.11 = LIB Debug - DLL OpenSSL - ConfigName.12 = LIB Debug - DLL OpenSSL - DLL LibSSH2 - ConfigName.13 = LIB Debug - DLL Windows SSPI - ConfigName.14 = LIB Debug - DLL Windows SSPI - DLL WinIDN - ConfigName.15 = LIB Debug - LIB OpenSSL - ConfigName.16 = LIB Debug - LIB OpenSSL - LIB LibSSH2 - ConfigName.17 = LIB Release - ConfigName.18 = LIB Release - DLL OpenSSL - ConfigName.19 = LIB Release - DLL OpenSSL - DLL LibSSH2 - ConfigName.20 = LIB Release - DLL Windows SSPI - ConfigName.21 = LIB Release - DLL Windows SSPI - DLL WinIDN - ConfigName.22 = LIB Release - LIB OpenSSL - ConfigName.23 = LIB Release - LIB OpenSSL - LIB LibSSH2 + ConfigName.4 = DLL Release + ConfigName.5 = DLL Release - DLL OpenSSL + ConfigName.6 = DLL Release - DLL OpenSSL - DLL LibSSH2 + ConfigName.7 = DLL Release - DLL Windows SSPI + ConfigName.8 = LIB Debug + ConfigName.9 = LIB Debug - DLL OpenSSL + ConfigName.10 = LIB Debug - DLL OpenSSL - DLL LibSSH2 + ConfigName.11 = LIB Debug - DLL Windows SSPI + ConfigName.12 = LIB Debug - LIB OpenSSL + ConfigName.13 = LIB Debug - LIB OpenSSL - LIB LibSSH2 + ConfigName.14 = LIB Release + ConfigName.15 = LIB Release - DLL OpenSSL + ConfigName.16 = LIB Release - DLL OpenSSL - DLL LibSSH2 + ConfigName.17 = LIB Release - DLL Windows SSPI + ConfigName.18 = LIB Release - LIB OpenSSL + ConfigName.19 = LIB Release - LIB OpenSSL - LIB LibSSH2 EndGlobalSection GlobalSection(ProjectDependencies) = postSolution EndGlobalSection @@ -39,8 +35,6 @@ Global {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI.Build.0 = DLL Debug - DLL Windows SSPI|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release.ActiveCfg = DLL Release|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release.Build.0 = DLL Release|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL.ActiveCfg = DLL Release - DLL OpenSSL|Win32 @@ -49,8 +43,6 @@ Global {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI.ActiveCfg = DLL Release - DLL Windows SSPI|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI.Build.0 = DLL Release - DLL Windows SSPI|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug.ActiveCfg = LIB Debug|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug.Build.0 = LIB Debug|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL.ActiveCfg = LIB Debug - DLL OpenSSL|Win32 @@ -59,8 +51,6 @@ Global {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI.Build.0 = LIB Debug - DLL Windows SSPI|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL.ActiveCfg = LIB Debug - LIB OpenSSL|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL.Build.0 = LIB Debug - LIB OpenSSL|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 @@ -73,8 +63,6 @@ Global {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI.ActiveCfg = LIB Release - DLL Windows SSPI|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI.Build.0 = LIB Release - DLL Windows SSPI|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL.ActiveCfg = LIB Release - LIB OpenSSL|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL.Build.0 = LIB Release - LIB OpenSSL|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 diff --git a/projects/Windows/VC7/lib/libcurl.tmpl b/projects/Windows/VC7/lib/libcurl.tmpl index 888e3eb..a624350 100644 --- a/projects/Windows/VC7/lib/libcurl.tmpl +++ b/projects/Windows/VC7/lib/libcurl.tmpl @@ -23,7 +23,7 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" + PreprocessorDefinitions="WIN32;NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" @@ -75,7 +75,7 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL" + PreprocessorDefinitions="WIN32;_DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL" BasicRuntimeChecks="3" RuntimeLibrary="3" WarningLevel="3" @@ -128,7 +128,7 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL" + PreprocessorDefinitions="WIN32;_DEBUG;BUILDING_LIBCURL" BasicRuntimeChecks="3" RuntimeLibrary="3" WarningLevel="3" @@ -180,7 +180,7 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL" + PreprocessorDefinitions="WIN32,NDEBUG,BUILDING_LIBCURL,CURL_STATICLIB,USE_SSLEAY,USE_OPENSSL" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" @@ -221,7 +221,7 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" + PreprocessorDefinitions="WIN32,_DEBUG,BUILDING_LIBCURL,CURL_STATICLIB,USE_SSLEAY,USE_OPENSSL,USE_LIBSSH2,HAVE_LIBSSH2_H" BasicRuntimeChecks="3" RuntimeLibrary="3" WarningLevel="3" @@ -262,7 +262,7 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL" + PreprocessorDefinitions="WIN32;NDEBUG;BUILDING_LIBCURL" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" @@ -313,7 +313,7 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" + PreprocessorDefinitions="WIN32,_DEBUG,BUILDING_LIBCURL,CURL_STATICLIB,USE_SSLEAY,USE_OPENSSL,USE_LIBSSH2,HAVE_LIBSSH2_H" BasicRuntimeChecks="3" RuntimeLibrary="3" WarningLevel="3" @@ -354,7 +354,7 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL" + PreprocessorDefinitions="WIN32,_DEBUG,BUILDING_LIBCURL,CURL_STATICLIB,USE_WINDOWS_SSPI,USE_SCHANNEL" BasicRuntimeChecks="3" RuntimeLibrary="3" WarningLevel="3" @@ -395,7 +395,7 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL" + PreprocessorDefinitions="WIN32,_DEBUG,BUILDING_LIBCURL,CURL_STATICLIB,USE_SSLEAY,USE_OPENSSL" BasicRuntimeChecks="3" RuntimeLibrary="3" WarningLevel="3" @@ -436,7 +436,7 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL" + PreprocessorDefinitions="WIN32;NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" @@ -487,7 +487,7 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL" + PreprocessorDefinitions="WIN32;_DEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL" BasicRuntimeChecks="3" RuntimeLibrary="3" WarningLevel="3" @@ -539,7 +539,7 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL" + PreprocessorDefinitions="WIN32,NDEBUG,BUILDING_LIBCURL,CURL_STATICLIB,USE_WINDOWS_SSPI,USE_SCHANNEL" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" @@ -580,7 +580,7 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL" + PreprocessorDefinitions="WIN32;NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" @@ -632,7 +632,7 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL" + PreprocessorDefinitions="WIN32,NDEBUG,BUILDING_LIBCURL,CURL_STATICLIB,USE_SSLEAY,USE_OPENSSL" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" @@ -673,7 +673,7 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB" + PreprocessorDefinitions="WIN32,NDEBUG,BUILDING_LIBCURL,CURL_STATICLIB" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" @@ -714,7 +714,7 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" + PreprocessorDefinitions="WIN32,NDEBUG,BUILDING_LIBCURL,CURL_STATICLIB,USE_SSLEAY,USE_OPENSSL,USE_LIBSSH2,HAVE_LIBSSH2_H" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" @@ -755,7 +755,7 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" + PreprocessorDefinitions="WIN32,NDEBUG,BUILDING_LIBCURL,CURL_STATICLIB,USE_SSLEAY,USE_OPENSSL,USE_LIBSSH2,HAVE_LIBSSH2_H" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" @@ -796,7 +796,7 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB" + PreprocessorDefinitions="WIN32,_DEBUG,BUILDING_LIBCURL,CURL_STATICLIB" BasicRuntimeChecks="3" RuntimeLibrary="3" WarningLevel="3" @@ -837,7 +837,7 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" + PreprocessorDefinitions="WIN32;_DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" BasicRuntimeChecks="3" RuntimeLibrary="3" WarningLevel="3" @@ -890,7 +890,7 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL" + PreprocessorDefinitions="WIN32,_DEBUG,BUILDING_LIBCURL,CURL_STATICLIB,USE_SSLEAY,USE_OPENSSL" BasicRuntimeChecks="3" RuntimeLibrary="3" WarningLevel="3" @@ -919,191 +919,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -71,10 +74,13 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="NDEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" CompileAs="0"/> @@ -120,10 +126,13 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE,CURL_STATICLIB" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" CompileAs="0"/> @@ -169,9 +178,12 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32,_DEBUG,_CONSOLE,CURL_STATICLIB" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" DebugInformationFormat="3" @@ -220,9 +232,12 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32,_DEBUG,_CONSOLE,CURL_STATICLIB" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" DebugInformationFormat="3" @@ -271,9 +286,12 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="_DEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32,_DEBUG,_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" DebugInformationFormat="3" @@ -322,9 +340,12 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32,_DEBUG,_CONSOLE,CURL_STATICLIB" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" DebugInformationFormat="3" @@ -373,10 +394,13 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE,CURL_STATICLIB" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" CompileAs="0"/> @@ -422,10 +446,13 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE,CURL_STATICLIB" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" CompileAs="0"/> @@ -471,10 +498,13 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE,CURL_STATICLIB" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" CompileAs="0"/> @@ -520,10 +550,13 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE,CURL_STATICLIB" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" CompileAs="0"/> @@ -569,9 +602,12 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32,_DEBUG,_CONSOLE,CURL_STATICLIB" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" DebugInformationFormat="3" @@ -620,9 +656,12 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32,_DEBUG,_CONSOLE,CURL_STATICLIB" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" DebugInformationFormat="3" @@ -671,9 +710,12 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="_DEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32,_DEBUG,_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" DebugInformationFormat="3" @@ -722,10 +764,13 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="NDEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" CompileAs="0"/> @@ -771,10 +816,13 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="NDEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" CompileAs="0"/> @@ -820,9 +868,12 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="_DEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32,_DEBUG,_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" DebugInformationFormat="3" @@ -871,9 +922,12 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32,_DEBUG,_CONSOLE,CURL_STATICLIB" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" DebugInformationFormat="3" @@ -922,10 +976,13 @@ AdditionalOptions="/EHsc " InlineFunctionExpansion="1" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="NDEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" CompileAs="0"/> @@ -971,9 +1028,12 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src" - PreprocessorDefinitions="_DEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32,_DEBUG,_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="TRUE" DebugInformationFormat="3" @@ -1010,206 +1070,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -136,10 +140,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -223,10 +231,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -311,10 +323,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -397,10 +413,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -487,10 +507,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -576,10 +600,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -666,10 +694,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -755,10 +787,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -845,10 +881,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -934,10 +974,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -1024,10 +1068,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -1114,10 +1162,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -1202,10 +1254,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -1289,10 +1345,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -1377,10 +1437,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -1463,10 +1527,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -1553,10 +1621,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -1643,10 +1715,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -1731,10 +1807,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -1817,10 +1897,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -1907,10 +1991,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -1997,10 +2085,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -2085,10 +2177,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -2171,10 +2267,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -2261,10 +2361,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -2351,10 +2455,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -2439,10 +2547,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -2525,10 +2637,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -2615,10 +2731,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -2705,10 +2825,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -2793,10 +2917,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -2879,10 +3007,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -2969,10 +3101,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -3059,10 +3195,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -3147,10 +3287,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -3233,10 +3377,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -3323,10 +3471,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -3413,10 +3565,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -3501,10 +3657,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -3557,714 +3717,6 @@ Name="VCPostBuildEventTool" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/projects/Windows/VC9/curl.sln b/projects/Windows/VC9/curl.sln index 4415186..eb00cb1 100644 --- a/projects/Windows/VC9/curl.sln +++ b/projects/Windows/VC9/curl.sln @@ -13,8 +13,6 @@ Global 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|Win32 = DLL Debug|Win32 @@ -23,8 +21,6 @@ Global 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|Win32 = DLL Release|Win32 @@ -33,8 +29,6 @@ Global 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 @@ -47,8 +41,6 @@ Global 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 @@ -67,10 +59,6 @@ Global {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 @@ -87,10 +75,6 @@ Global {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 @@ -107,10 +91,6 @@ Global {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 @@ -135,10 +115,6 @@ Global {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 @@ -163,10 +139,6 @@ Global {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 @@ -183,10 +155,6 @@ Global {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 @@ -203,10 +171,6 @@ Global {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 @@ -231,10 +195,6 @@ Global {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 diff --git a/projects/Windows/VC9/lib/libcurl.sln b/projects/Windows/VC9/lib/libcurl.sln index acfbaca..17e6aec 100644 --- a/projects/Windows/VC9/lib/libcurl.sln +++ b/projects/Windows/VC9/lib/libcurl.sln @@ -8,8 +8,6 @@ Global 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|Win32 = DLL Debug|Win32 @@ -18,8 +16,6 @@ Global 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|Win32 = DLL Release|Win32 @@ -28,8 +24,6 @@ Global 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 @@ -42,8 +36,6 @@ Global 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 @@ -62,10 +54,6 @@ Global {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 @@ -82,10 +70,6 @@ Global {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|Win32.Build.0 = DLL Debug - DLL OpenSSL|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|x64.ActiveCfg = DLL Debug - DLL OpenSSL|x64 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|x64.Build.0 = DLL Debug - DLL OpenSSL|x64 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Debug - 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 Debug - DLL Windows SSPI|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|Win32.Build.0 = DLL Debug - DLL Windows SSPI|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|x64.ActiveCfg = DLL Release - DLL Windows SSPI|x64 @@ -102,10 +86,6 @@ Global {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 @@ -130,10 +110,6 @@ Global {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 diff --git a/projects/Windows/VC9/lib/libcurl.tmpl b/projects/Windows/VC9/lib/libcurl.tmpl index 8ce9df4..bf693ef 100644 --- a/projects/Windows/VC9/lib/libcurl.tmpl +++ b/projects/Windows/VC9/lib/libcurl.tmpl @@ -52,7 +52,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL" + PreprocessorDefinitions="WIN32;_DEBUG;BUILDING_LIBCURL" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -144,7 +144,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL" + PreprocessorDefinitions="WIN64;_DEBUG;BUILDING_LIBCURL" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -236,7 +236,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL" + PreprocessorDefinitions="WIN32;NDEBUG;BUILDING_LIBCURL" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -326,7 +326,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL" + PreprocessorDefinitions="WIN64;NDEBUG;BUILDING_LIBCURL" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -408,7 +408,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -479,7 +479,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB" + PreprocessorDefinitions="WIN64;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -550,7 +550,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -621,7 +621,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB" + PreprocessorDefinitions="WIN64;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -696,7 +696,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL" + PreprocessorDefinitions="WIN32;_DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -788,7 +788,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL" + PreprocessorDefinitions="WIN64;_DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -880,7 +880,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL" + PreprocessorDefinitions="WIN32;NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -970,7 +970,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL" + PreprocessorDefinitions="WIN64;NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -1058,7 +1058,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL" + PreprocessorDefinitions="WIN32;_DEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -1150,7 +1150,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL" + PreprocessorDefinitions="WIN64;_DEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -1242,7 +1242,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL" + PreprocessorDefinitions="WIN32;NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -1332,7 +1332,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL" + PreprocessorDefinitions="WIN64;NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -1420,7 +1420,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" + PreprocessorDefinitions="WIN32;_DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -1512,7 +1512,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" + PreprocessorDefinitions="WIN64;_DEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -1604,7 +1604,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" + PreprocessorDefinitions="WIN32;NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -1694,7 +1694,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" + PreprocessorDefinitions="WIN64;NDEBUG;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -1776,7 +1776,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL" + PreprocessorDefinitions="WIN32;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -1847,7 +1847,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL" + PreprocessorDefinitions="WIN64;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -1917,7 +1917,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" + PreprocessorDefinitions="WIN32;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -1988,7 +1988,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" + PreprocessorDefinitions="WIN64;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -2058,7 +2058,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL" + PreprocessorDefinitions="WIN32;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -2129,7 +2129,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL" + PreprocessorDefinitions="WIN64;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -2199,7 +2199,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL" + PreprocessorDefinitions="WIN32;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -2270,7 +2270,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL" + PreprocessorDefinitions="WIN64;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -2340,7 +2340,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" + PreprocessorDefinitions="WIN32;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -2411,7 +2411,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include" - PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" + PreprocessorDefinitions="WIN64;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -2482,7 +2482,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL" + PreprocessorDefinitions="WIN32;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -2553,7 +2553,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL" + PreprocessorDefinitions="WIN64;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -2623,7 +2623,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" + PreprocessorDefinitions="WIN32;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -2694,7 +2694,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" + PreprocessorDefinitions="WIN64;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -2764,7 +2764,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL" + PreprocessorDefinitions="WIN32;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -2835,7 +2835,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL" + PreprocessorDefinitions="WIN64;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -2905,7 +2905,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL" + PreprocessorDefinitions="WIN32;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -2976,7 +2976,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL" + PreprocessorDefinitions="WIN64;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -3046,7 +3046,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" + PreprocessorDefinitions="WIN32;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -3117,651 +3117,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include" - PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H" - StringPooling="true" - RuntimeLibrary="2" - EnableFunctionLevelLinking="true" - WarningLevel="3" - SuppressStartupBanner="true" - /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -136,10 +140,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -222,10 +230,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -309,10 +321,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -394,10 +410,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -483,10 +503,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -571,10 +595,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -660,10 +688,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -748,10 +780,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -837,10 +873,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -925,10 +965,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -1014,10 +1058,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -1103,10 +1151,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -1190,10 +1242,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -1276,10 +1332,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -1363,10 +1423,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -1448,10 +1512,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -1537,10 +1605,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -1626,10 +1698,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -1713,10 +1789,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -1798,10 +1878,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -1887,10 +1971,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -1976,10 +2064,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -2063,10 +2155,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -2148,10 +2244,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -2237,10 +2337,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -2326,10 +2430,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -2413,10 +2521,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -2498,10 +2610,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -2587,10 +2703,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -2676,10 +2796,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -2763,10 +2887,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -2848,10 +2976,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -2937,10 +3069,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -3026,10 +3162,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -3113,10 +3253,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -3198,10 +3342,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -3287,10 +3435,14 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="_DEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -3376,10 +3528,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -3463,10 +3619,14 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib" - PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)$(TargetName).pch" + AssemblerListingLocation="$(IntDir)" + ObjectFile="$(IntDir)\" + XMLDocumentationFileName="$(IntDir)" WarningLevel="3" SuppressStartupBanner="true" /> @@ -3518,706 +3678,6 @@ Name="VCPostBuildEventTool" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/projects/build-openssl.bat b/projects/build-openssl.bat index 24410dc..66c8c9a 100644 --- a/projects/build-openssl.bat +++ b/projects/build-openssl.bat @@ -6,7 +6,7 @@ rem * / __| | | | |_) | | rem * | (__| |_| | _ <| |___ rem * \___|\___/|_| \_\_____| rem * -rem * Copyright (C) 2012 - 2015, Steve Holme, . +rem * Copyright (C) 2012 - 2014, 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 @@ -86,9 +86,9 @@ rem *************************************************************************** shift & goto parseArgs :prerequisites - rem Default the start directory if one isn't specified - if not defined START_DIR set START_DIR=..\..\openssl - + 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%" @@ -104,17 +104,9 @@ rem *************************************************************************** rem Check we have Visual Studio installed if not exist "%PF%\%VC_PATH%" goto novc - - rem Check we have Perl installed - echo %PATH% | findstr /I /C:"\Perl" 1>nul - if errorlevel 1 ( - if not exist "%SystemDrive%\Perl" ( - if not exist "%SystemDrive%\Perl64" goto noperl - ) - ) - - rem Check the start directory exists - if not exist "%START_DIR%" goto noopenssl + + rem Check the start directory exists + if not exist "%START_DIR%" goto noopenssl :configure if "%BUILD_PLATFORM%" == "" ( @@ -164,7 +156,7 @@ rem *************************************************************************** set OUTDIR=build\Win64\%VC_DESC% if not exist %OUTDIR% md %OUTDIR% - if "%BUILD_CONFIG%" == "release" goto x64release + if "%BUILD_CONFIG%" == "release" goto x86release :x64debug rem Configuring 64-bit Debug Build @@ -268,7 +260,7 @@ rem *************************************************************************** :syntax rem Display the help echo. - echo Usage: build-openssl ^ ^ [configuration] [directory] + echo Usage: build-openssl ^ ^ [configuration] [directory] echo. echo Compiler: echo. @@ -316,21 +308,16 @@ rem *************************************************************************** echo Error: %VC_DESC% is not installed goto error -:noperl - echo. - echo Error: Perl is not installed - goto error - -:nox64 - echo. - echo Error: %VC_DESC% does not support 64-bit builds - goto error - -:noopenssl - echo. - echo Error: Cannot locate OpenSSL source directory - goto error - +:nox64 + echo. + echo Error: %VC_DESC% does not support 64-bit builds + goto error + +:noopenssl + echo. + echo Error: Cannot locate OpenSSL source directory + goto error + :error if "%OS%" == "Windows_NT" endlocal exit /B 1 diff --git a/projects/checksrc.bat b/projects/checksrc.bat deleted file mode 100644 index d81ce7d..0000000 --- a/projects/checksrc.bat +++ /dev/null @@ -1,84 +0,0 @@ -@echo off -rem *************************************************************************** -rem * _ _ ____ _ -rem * Project ___| | | | _ \| | -rem * / __| | | | |_) | | -rem * | (__| |_| | _ <| |___ -rem * \___|\___/|_| \_\_____| -rem * -rem * Copyright (C) 2014 - 2015, 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 http://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 - setlocal - - rem Display the help - if /i "%~1" == "-?" goto syntax - if /i "%~1" == "-h" goto syntax - if /i "%~1" == "-help" goto syntax - -:prerequisites - rem Check we have Perl installed - echo %PATH% | findstr /I /C:"\Perl" 1>nul - if errorlevel 1 ( - if not exist "%SystemDrive%\Perl" ( - if not exist "%SystemDrive%\Perl64" goto noperl - ) - ) - -:configure - if "%1" == "" set SRC_DIR=.. - if not "%1" == "" set SRC_DIR=%~1% - if not exist "%SRC_DIR%" goto nosrc - -:start - for /f "delims=" %%i in ('dir %SRC_DIR%\src\*.c.* /b') do @perl %SRC_DIR%\lib\checksrc.pl -D%SRC_DIR%\src "%%i" - for /f "delims=" %%i in ('dir %SRC_DIR%\src\*.h.* /b') do @perl %SRC_DIR%\lib\checksrc.pl -D%SRC_DIR%\src "%%i" - for /f "delims=" %%i in ('dir %SRC_DIR%\lib\*.c.* /b') do @perl %SRC_DIR%\lib\checksrc.pl -D%SRC_DIR%\lib "%%i" - for /f "delims=" %%i in ('dir %SRC_DIR%\lib\*.h.* /b') do @perl %SRC_DIR%\lib\checksrc.pl -D%SRC_DIR%\lib -Wcurl_config.h.cmake "%%i" - goto success - -:syntax - rem Display the help - echo. - echo Usage: checksrc [directory] - echo. - echo directory - Specifies the curl source directory - goto success - -:nodos - echo. - echo Error: Only a Windows NT based Operating System is supported - goto error - -:noperl - echo. - echo Error: Perl is not installed - goto error - -:nosrc - echo. - echo Error: "%SRC_DIR%" does not exist - goto error - -:error - if "%OS%" == "Windows_NT" endlocal - exit /B 1 - -:success - endlocal - exit /B 0 diff --git a/projects/generate.bat b/projects/generate.bat index a95cc9a..4ac5fe2 100644 --- a/projects/generate.bat +++ b/projects/generate.bat @@ -21,98 +21,46 @@ 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 - setlocal - - rem Display the help - if /i "%~1" == "-?" goto syntax - if /i "%~1" == "-h" goto syntax - if /i "%~1" == "-help" goto syntax - -:parseArgs - if "%~1" == "" goto all - - if /i "%~1" == "vc6" ( - goto vc6 - ) else if /i "%~1" == "vc7" ( - goto vc7 - ) else if /i "%~1" == "vc7.1" ( - goto vc71 - ) else if /i "%~1" == "vc8" ( - goto vc8 - ) else if /i "%~1" == "vc9" ( - goto vc9 - ) else if /i "%~1" == "vc10" ( - goto vc10 - ) else if /i "%~1" == "vc11" ( - goto vc11 - ) else if /i "%~1" == "vc12" ( - goto vc12 - ) else ( - goto unknown - ) - -:all - set ALL=true - -:vc6 - echo. - echo Generating VC6 project files - call :generate dsp Windows\VC6\src\curlsrc.tmpl Windows\VC6\src\curlsrc.dsp - call :generate dsp Windows\VC6\lib\libcurl.tmpl Windows\VC6\lib\libcurl.dsp - if not "%ALL%" == "true" goto success - -:vc7 - echo. - echo Generating VC7 project files - call :generate vcproj1 Windows\VC7\src\curlsrc.tmpl Windows\VC7\src\curlsrc.vcproj - call :generate vcproj1 Windows\VC7\lib\libcurl.tmpl Windows\VC7\lib\libcurl.vcproj - if not "%ALL%" == "true" goto success - -:vc71 - echo. - echo Generating VC7.1 project files - call :generate vcproj1 Windows\VC7.1\src\curlsrc.tmpl Windows\VC7.1\src\curlsrc.vcproj - call :generate vcproj1 Windows\VC7.1\lib\libcurl.tmpl Windows\VC7.1\lib\libcurl.vcproj - if not "%ALL%" == "true" goto success - -:vc8 - echo. - echo Generating VC8 project files - call :generate vcproj2 Windows\VC8\src\curlsrc.tmpl Windows\VC8\src\curlsrc.vcproj - call :generate vcproj2 Windows\VC8\lib\libcurl.tmpl Windows\VC8\lib\libcurl.vcproj - if not "%ALL%" == "true" goto success - -:vc9 - echo. - echo Generating VC9 project files - call :generate vcproj2 Windows\VC9\src\curlsrc.tmpl Windows\VC9\src\curlsrc.vcproj - call :generate vcproj2 Windows\VC9\lib\libcurl.tmpl Windows\VC9\lib\libcurl.vcproj - if not "%ALL%" == "true" goto success - -:vc10 - echo. - echo Generating VC10 project files - call :generate vcxproj Windows\VC10\src\curlsrc.tmpl Windows\VC10\src\curlsrc.vcxproj - call :generate vcxproj Windows\VC10\lib\libcurl.tmpl Windows\VC10\lib\libcurl.vcxproj - if not "%ALL%" == "true" goto success - -:vc11 - echo. - echo Generating VC11 project files - call :generate vcxproj Windows\VC11\src\curlsrc.tmpl Windows\VC11\src\curlsrc.vcxproj - call :generate vcxproj Windows\VC11\lib\libcurl.tmpl Windows\VC11\lib\libcurl.vcxproj - if not "%ALL%" == "true" goto success - -:vc12 - echo. - echo Generating VC12 project files - call :generate vcxproj Windows\VC12\src\curlsrc.tmpl Windows\VC12\src\curlsrc.vcxproj - call :generate vcxproj Windows\VC12\lib\libcurl.tmpl Windows\VC12\lib\libcurl.vcxproj - - goto success +echo Generating VC6 project files +call :generate dsp Windows\VC6\src\curlsrc.tmpl Windows\VC6\src\curlsrc.dsp +call :generate dsp Windows\VC6\lib\libcurl.tmpl Windows\VC6\lib\libcurl.dsp + +echo. +echo Generating VC7 project files +call :generate vcproj1 Windows\VC7\src\curlsrc.tmpl Windows\VC7\src\curlsrc.vcproj +call :generate vcproj1 Windows\VC7\lib\libcurl.tmpl Windows\VC7\lib\libcurl.vcproj + +echo. +echo Generating VC7.1 project files +call :generate vcproj1 Windows\VC7.1\src\curlsrc.tmpl Windows\VC7.1\src\curlsrc.vcproj +call :generate vcproj1 Windows\VC7.1\lib\libcurl.tmpl Windows\VC7.1\lib\libcurl.vcproj + +echo. +echo Generating VC8 project files +call :generate vcproj2 Windows\VC8\src\curlsrc.tmpl Windows\VC8\src\curlsrc.vcproj +call :generate vcproj2 Windows\VC8\lib\libcurl.tmpl Windows\VC8\lib\libcurl.vcproj + +echo. +echo Generating VC9 project files +call :generate vcproj2 Windows\VC9\src\curlsrc.tmpl Windows\VC9\src\curlsrc.vcproj +call :generate vcproj2 Windows\VC9\lib\libcurl.tmpl Windows\VC9\lib\libcurl.vcproj + +echo. +echo Generating VC10 project files +call :generate vcxproj Windows\VC10\src\curlsrc.tmpl Windows\VC10\src\curlsrc.vcxproj +call :generate vcxproj Windows\VC10\lib\libcurl.tmpl Windows\VC10\lib\libcurl.vcxproj + +echo. +echo Generating VC11 project files +call :generate vcxproj Windows\VC11\src\curlsrc.tmpl Windows\VC11\src\curlsrc.vcxproj +call :generate vcxproj Windows\VC11\lib\libcurl.tmpl Windows\VC11\lib\libcurl.vcxproj + +echo. +echo Generating VC12 project files +call :generate vcxproj Windows\VC12\src\curlsrc.tmpl Windows\VC12\src\curlsrc.vcxproj +call :generate vcxproj Windows\VC12\lib\libcurl.tmpl Windows\VC12\lib\libcurl.vcxproj + +goto exit rem Main generate function. rem @@ -146,6 +94,7 @@ rem 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 "strdup.c" %3 call :element %1 lib "rawstr.c" %3 call :element %1 lib "nonblock.c" %3 call :element %1 lib "warnless.c" %3 @@ -153,6 +102,7 @@ rem 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 "strdup.h" %3 call :element %1 lib "rawstr.h" %3 call :element %1 lib "nonblock.h" %3 call :element %1 lib "warnless.h" %3 @@ -241,37 +191,6 @@ rem set %2=%ename% exit /B -:syntax - rem Display the help - echo. - echo Usage: generate [compiler] +:exit echo. - echo Compiler: - echo. - 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 - 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 - -:error - endlocal - exit /B 1 - -:success - endlocal - exit /B 0 + pause diff --git a/src/.gitignore b/src/.gitignore index c7ffcdc..761433b 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -5,6 +5,7 @@ tool_hugehelp.c stamp-h2 Makefile.vc8.dist Makefile.vc9.dist +version.h.dist tool_version.h.dist Makefile.vc10.dist config-win32.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9c1fd54..2822c5b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,38 +1,11 @@ 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( - OUTPUT tool_hugehelp.c - COMMAND echo "#include \"tool_setup.h\"" > tool_hugehelp.c - COMMAND 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_SOURCE_DIR}/docs/MANUAL" >> tool_hugehelp.c - COMMAND 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_SOURCE_DIR}/docs/MANUAL" >> tool_hugehelp.c - COMMAND echo "#endif /* HAVE_LIBZ */" >> tool_hugehelp.c - DEPENDS - "${CURL_SOURCE_DIR}/docs/MANUAL" - "${CURL_SOURCE_DIR}/docs/curl.1" - "${CMAKE_CURRENT_SOURCE_DIR}/mkhelp.pl" - "${CMAKE_CURRENT_SOURCE_DIR}/tool_hugehelp.h" - VERBATIM) -else() - add_custom_command( - OUTPUT tool_hugehelp.c - COMMAND echo "/* built-in manual is disabled, blank function */" > tool_hugehelp.c - COMMAND echo "#include \"tool_hugehelp.h\"" >> tool_hugehelp.c - COMMAND echo "void hugehelp(void) {}" >> tool_hugehelp.c - DEPENDS - "${CMAKE_CURRENT_SOURCE_DIR}/tool_hugehelp.h" - VERBATIM) +# First try to locate tool_hugehelp.c to see if it has already been created +# TODO Find the file WITHOUT adding a cache entry!!! Or else the user can delete the file after the script was first run, and the script won't notice it has gone. +find_file(HUGEHELP_C_FILE tool_hugehelp.c PATHS . NO_DEFAULT_PATH) +if (NOT HUGEHELP_C_FILE) + message(STATUS "Warning: tool_hugehelp.c file was not generated before. Generating an 'empty' file...") + file(WRITE tool_hugehelp.c "/* built-in manual is disabled, blank function */\n#include \"tool_hugehelp.h\"\nvoid hugehelp(void) {}\n\n") endif() transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") @@ -55,12 +28,13 @@ 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" - # 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" ) -#Build cURL executable -target_link_libraries( ${EXE_NAME} libcurl ${CURL_LIBS}) + +# Setup dependencies +setup_curl_dependencies(${EXE_NAME}) +target_link_libraries( ${EXE_NAME} libcurl ) + ################################################################################ diff --git a/src/Makefile.Watcom b/src/Makefile.Watcom index c485665..8d9754f 100644 --- a/src/Makefile.Watcom +++ b/src/Makefile.Watcom @@ -108,7 +108,7 @@ LIBRTMP_ROOT = ../../rtmpdump-2.3 !ifdef %openssl_root OPENSSL_ROOT = $(%openssl_root) !else -OPENSSL_ROOT = ../../openssl-0.9.8zc +OPENSSL_ROOT = ../../openssl-0.9.8y !endif !ifdef %ares_root diff --git a/src/Makefile.am b/src/Makefile.am index f96618e..72e6772 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -21,9 +21,6 @@ ########################################################################### AUTOMAKE_OPTIONS = foreign nostdinc -# remove targets if the command fails -.DELETE_ON_ERROR: - # Specify our include paths here, and do it relative to $(top_srcdir) and # $(top_builddir), to ensure that these paths which belong to the library # being currently built and tested are searched before the library which @@ -62,7 +59,7 @@ LIBS = $(BLANK_AT_MAKETIME) if USE_EXPLICIT_LIB_DEPS curl_LDADD = $(top_builddir)/lib/libcurl.la @LIBMETALINK_LIBS@ @LIBCURL_LIBS@ else -curl_LDADD = $(top_builddir)/lib/libcurl.la @LIBMETALINK_LIBS@ @NSS_LIBS@ @ZLIB_LIBS@ @CURL_NETWORK_AND_TIME_LIBS@ +curl_LDADD = $(top_builddir)/lib/libcurl.la @LIBMETALINK_LIBS@ @ZLIB_LIBS@ @CURL_NETWORK_AND_TIME_LIBS@ endif curl_LDFLAGS = @LIBMETALINK_LDFLAGS@ diff --git a/src/Makefile.b32 b/src/Makefile.b32 index 6638a01..9f9885a 100644 --- a/src/Makefile.b32 +++ b/src/Makefile.b32 @@ -27,7 +27,7 @@ ZLIB_PATH = ..\..\zlib-1.2.8 # Edit the path below to point to the base of your OpenSSL package. !ifndef OPENSSL_PATH -OPENSSL_PATH = ..\..\openssl-0.9.8zc +OPENSSL_PATH = ..\..\openssl-0.9.8y !endif # Set program's name diff --git a/src/Makefile.inc b/src/Makefile.inc index 401a635..64d55ec 100644 --- a/src/Makefile.inc +++ b/src/Makefile.inc @@ -11,6 +11,7 @@ # the official API, but we re-use the code here to avoid duplication. CURLX_CFILES = \ ../lib/strtoofft.c \ + ../lib/strdup.c \ ../lib/rawstr.c \ ../lib/nonblock.c \ ../lib/warnless.c @@ -18,6 +19,7 @@ CURLX_CFILES = \ CURLX_HFILES = \ ../lib/curl_setup.h \ ../lib/strtoofft.h \ + ../lib/strdup.h \ ../lib/rawstr.h \ ../lib/nonblock.h \ ../lib/warnless.h @@ -53,7 +55,6 @@ CURL_CFILES = \ tool_panykey.c \ tool_paramhlp.c \ tool_parsecfg.c \ - tool_strdup.c \ tool_setopt.c \ tool_sleep.c \ tool_urlglob.c \ @@ -98,7 +99,6 @@ CURL_HFILES = \ tool_setopt.h \ tool_setup.h \ tool_sleep.h \ - tool_strdup.h \ tool_urlglob.h \ tool_util.h \ tool_version.h \ diff --git a/src/Makefile.m32 b/src/Makefile.m32 index f3f9054..1c22dd0 100644 --- a/src/Makefile.m32 +++ b/src/Makefile.m32 @@ -18,7 +18,7 @@ ZLIB_PATH = ../../zlib-1.2.8 endif # Edit the path below to point to the base of your OpenSSL package. ifndef OPENSSL_PATH -OPENSSL_PATH = ../../openssl-0.9.8zc +OPENSSL_PATH = ../../openssl-0.9.8y endif # Edit the path below to point to the base of your LibSSH2 package. ifndef LIBSSH2_PATH @@ -54,10 +54,6 @@ endif ifndef LDAP_SDK LDAP_SDK = c:/novell/ndk/cldapsdk/win32 endif -# Edit the path below to point to the base of your nghttp2 package. -ifndef NGHTTP2_PATH -NGHTTP2_PATH = ../../nghttp2-0.6.7 -endif PROOT = .. @@ -66,39 +62,27 @@ ifndef LIBCARES_PATH LIBCARES_PATH = $(PROOT)/ares endif +# Edit the var below to set to your architecture or set environment var. +ifndef ARCH +ARCH = w32 +endif + CC = $(CROSSPREFIX)gcc CFLAGS = -g -O2 -Wall CFLAGS += -fno-strict-aliasing +ifeq ($(ARCH),w64) +CFLAGS += -D_AMD64_ +endif # comment LDFLAGS below to keep debug info LDFLAGS = -s AR = $(CROSSPREFIX)ar RC = $(CROSSPREFIX)windres -RCFLAGS = --include-dir=$(PROOT)/include -O COFF -STRIP = $(CROSSPREFIX)strip -g +RCFLAGS = --include-dir=$(PROOT)/include -O COFF -i # We may need these someday # PERL = perl # NROFF = nroff -# Set environment var ARCH to your architecture to override autodetection. -ifndef ARCH -ifeq ($(findstring x86_64,$(shell $(CC) -dumpmachine)),x86_64) -ARCH = w64 -else -ARCH = w32 -endif -endif - -ifeq ($(ARCH),w64) -CFLAGS += -m64 -D_AMD64_ -LDFLAGS += -m64 -RCFLAGS += -F pe-x86-64 -else -CFLAGS += -m32 -LDFLAGS += -m32 -RCFLAGS += -F pe-i386 -endif - # Platform-dependent helper tool macros ifeq ($(findstring /sh,$(SHELL)),/sh) DEL = rm -f $1 @@ -164,6 +148,9 @@ endif ifeq ($(findstring -sspi,$(CFG)),-sspi) SSPI = 1 endif +ifeq ($(findstring -spnego,$(CFG)),-spnego) +SPNEGO = 1 +endif ifeq ($(findstring -ldaps,$(CFG)),-ldaps) LDAPS = 1 endif @@ -177,9 +164,6 @@ ifeq ($(findstring -winssl,$(CFG)),-winssl) WINSSL = 1 SSPI = 1 endif -ifeq ($(findstring -nghttp2,$(CFG)),-nghttp2) -NGHTTP2 = 1 -endif INCLUDES = -I. -I../include -I../lib @@ -207,10 +191,6 @@ ifdef RTMP CFLAGS += -DUSE_LIBRTMP curl_LDADD += -L"$(LIBRTMP_PATH)/librtmp" -lrtmp -lwinmm endif -ifdef NGHTTP2 - CFLAGS += -DUSE_NGHTTP2 - curl_LDADD += -L"$(NGHTTP2_PATH)/lib" -lnghttp2 -endif ifdef SSH2 CFLAGS += -DUSE_LIBSSH2 -DHAVE_LIBSSH2_H curl_LDADD += -L"$(LIBSSH2_PATH)/win32" -lssh2 @@ -278,6 +258,9 @@ ifdef SSPI CFLAGS += -DUSE_SCHANNEL endif endif +ifdef SPNEGO + CFLAGS += -DHAVE_SPNEGO +endif ifdef IPV6 CFLAGS += -DENABLE_IPV6 -D_WIN32_WINNT=0x0501 endif @@ -332,7 +315,7 @@ tool_hugehelp.c: $(CC) $(INCLUDES) $(CFLAGS) -c $< %.res: %.rc - $(RC) $(RCFLAGS) -i $< -o $@ + $(RC) $(RCFLAGS) $< -o $@ clean: ifeq "$(wildcard tool_hugehelp.c.cvs)" "tool_hugehelp.c.cvs" @@ -342,3 +325,4 @@ endif distclean vclean: clean @$(call DEL, $(curl_PROGRAMS)) + diff --git a/src/Makefile.netware b/src/Makefile.netware index b6b4861..85a1173 100644 --- a/src/Makefile.netware +++ b/src/Makefile.netware @@ -19,7 +19,7 @@ endif # Edit the path below to point to the base of your OpenSSL package. ifndef OPENSSL_PATH -OPENSSL_PATH = ../../openssl-0.9.8zc +OPENSSL_PATH = ../../openssl-0.9.8y endif # Edit the path below to point to the base of your LibSSH2 package. @@ -42,11 +42,6 @@ ifndef LIBRTMP_PATH LIBRTMP_PATH = ../../librtmp-2.3 endif -# Edit the path below to point to the base of your nghttp2 package. -ifndef NGHTTP2_PATH -NGHTTP2_PATH = ../../nghttp2-0.6.7 -endif - # Edit the path below to point to the base of your fbopenssl package. ifndef FBOPENSSL_PATH FBOPENSSL_PATH = ../../fbopenssl-0.4 @@ -231,13 +226,14 @@ endif ifeq ($(findstring -idn,$(CFG)),-idn) WITH_IDN = 1 endif +ifeq ($(findstring -spnego,$(CFG)),-spnego) +WITH_SPNEGO = 1 +WITH_SSL = 1 +endif ifeq ($(findstring -metalink,$(CFG)),-metalink) WITH_METALINK = 1 WITH_SSL = 1 endif -ifeq ($(findstring -nghttp2,$(CFG)),-nghttp2) -WITH_NGHTTP2 = 1 -endif ifeq ($(findstring -ipv6,$(CFG)),-ipv6) ENABLE_IPV6 = 1 endif @@ -271,6 +267,10 @@ ifdef WITH_SSL LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/ssl.$(LIBEXT) LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/crypto.$(LIBEXT) IMPORTS += GetProcessSwitchCount RunningProcess +ifdef WITH_SPNEGO + # INCLUDES += -I$(FBOPENSSL_PATH)/include + LDLIBS += $(FBOPENSSL_PATH)/nw/fbopenssl.$(LIBEXT) +endif else ifdef WITH_AXTLS # INCLUDES += -I$(AXTLS_PATH)/inc @@ -295,10 +295,6 @@ ifdef WITH_IDN # INCLUDES += -I$(LIBIDN_PATH)/include LDLIBS += $(LIBIDN_PATH)/lib/libidn.$(LIBEXT) endif -ifdef WITH_NGHTTP2 - INCLUDES += -I$(NGHTTP2_PATH)/include - LDLIBS += $(NGHTTP2_PATH)/lib/libnghttp2.$(LIBEXT) -endif ifdef WITH_METALINK CFLAGS += -DUSE_METALINK INCLUDES += -I$(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L) diff --git a/src/Makefile.vc6 b/src/Makefile.vc6 index c8693af..fc9464d 100644 --- a/src/Makefile.vc6 +++ b/src/Makefile.vc6 @@ -5,7 +5,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1999 - 2014, Daniel Stenberg, , et al. +# Copyright (C) 1999 - 2013, Daniel Stenberg, , 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,7 +56,7 @@ PROGRAM_NAME = curl.exe !IFNDEF OPENSSL_PATH -OPENSSL_PATH = ../../openssl-0.9.8zc +OPENSSL_PATH = ../../openssl-0.9.8y !ENDIF !IFNDEF ZLIB_PATH @@ -90,24 +90,19 @@ WINDOWS_SDK_PATH = "$(PROGRAMFILES)\Microsoft SDK" ######################################################## ## 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 +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_SSLEAY 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 @@ -345,8 +340,9 @@ 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) + +LINKLIBS = $(LINKLIBS) ws2_32.lib wldap32.lib advapi32.lib +LINKLIBS_DEBUG = $(LINKLIBS_DEBUG) ws2_32.lib wldap32.lib advapi32.lib all : release diff --git a/src/macos/MACINSTALL.TXT b/src/macos/MACINSTALL.TXT index 1839ef2..7dffa9d 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 write 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/tool_binmode.c b/src/tool_binmode.c index 5495ba4..92033ac 100644 --- a/src/tool_binmode.c +++ b/src/tool_binmode.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * 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 @@ -41,7 +41,7 @@ void set_binmode(FILE *stream) # ifdef __HIGHC__ _setmode(stream, O_BINARY); # else - (void)setmode(fileno(stream), O_BINARY); + setmode(fileno(stream), O_BINARY); # endif #else (void)stream; diff --git a/src/tool_cb_dbg.c b/src/tool_cb_dbg.c index 4add67c..010dae3 100644 --- a/src/tool_cb_dbg.c +++ b/src/tool_cb_dbg.c @@ -145,7 +145,7 @@ int tool_debug_cb(CURL *handle, curl_infotype type, if(!config->isatty || ((output != stderr) && (output != stdout))) { if(!newl) fprintf(output, "%s%s ", timebuf, s_infotype[type]); - fprintf(output, "[%zd bytes data]\n", size); + fprintf(output, "[data not shown]\n"); newl = FALSE; traced_data = TRUE; } diff --git a/src/tool_cfgable.c b/src/tool_cfgable.c index c78c896..2fdae07 100644 --- a/src/tool_cfgable.c +++ b/src/tool_cfgable.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * 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 @@ -36,9 +36,8 @@ void config_init(struct OperationConfig* config) config->maxredirs = DEFAULT_MAXREDIRS; config->proto = CURLPROTO_ALL; /* FIXME: better to read from library */ config->proto_present = FALSE; - config->proto_redir = CURLPROTO_ALL & /* All except FILE, SCP and SMB */ - ~(CURLPROTO_FILE | CURLPROTO_SCP | CURLPROTO_SMB | - CURLPROTO_SMBS); + config->proto_redir = + CURLPROTO_ALL & ~(CURLPROTO_FILE|CURLPROTO_SCP); /* not FILE or SCP */ config->proto_redir_present = FALSE; } @@ -102,7 +101,6 @@ static void free_config_fields(struct OperationConfig *config) Curl_safefree(config->cacert); Curl_safefree(config->capath); Curl_safefree(config->crlfile); - Curl_safefree(config->pinnedpubkey); Curl_safefree(config->key); Curl_safefree(config->key_type); Curl_safefree(config->key_passwd); @@ -115,7 +113,6 @@ static void free_config_fields(struct OperationConfig *config) Curl_safefree(config->xoauth2_bearer); - Curl_safefree(config->unix_socket_path); Curl_safefree(config->writeout); curl_slist_free_all(config->quote); diff --git a/src/tool_cfgable.h b/src/tool_cfgable.h index 4008cd0..4ef2690 100644 --- a/src/tool_cfgable.h +++ b/src/tool_cfgable.h @@ -110,7 +110,6 @@ struct OperationConfig { char *cacert; char *capath; char *crlfile; - char *pinnedpubkey; char *key; char *key_type; char *key_passwd; @@ -126,7 +125,6 @@ struct OperationConfig { bool globoff; bool use_httpget; bool insecure_ok; /* set TRUE to allow insecure SSL connects */ - bool verifystatus; bool create_dirs; bool ftp_create_dirs; bool ftp_skip_ip; @@ -202,14 +200,13 @@ struct OperationConfig { #ifdef CURLDEBUG bool test_event_based; #endif - char *xoauth2_bearer; /* XOAUTH2 bearer token */ - bool nonpn; /* enable/disable TLS NPN extension */ - bool noalpn; /* enable/disable TLS ALPN extension */ - char *unix_socket_path; /* path to Unix domain socket */ + char *xoauth2_bearer; /* XOAUTH2 bearer token */ + bool nonpn; /* enable/disable TLS NPN extension */ + bool noalpn; /* enable/disable TLS ALPN extension */ struct GlobalConfig *global; struct OperationConfig *prev; - struct OperationConfig *next; /* Always last in the struct */ + struct OperationConfig *next; /* Always last in the struct */ }; struct GlobalConfig { diff --git a/src/tool_getparam.c b/src/tool_getparam.c index 5b60c9c..9ac6ab2 100644 --- a/src/tool_getparam.c +++ b/src/tool_getparam.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * 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 @@ -176,7 +176,6 @@ static const struct LongShort aliases[]= { {"$J", "metalink", FALSE}, {"$K", "sasl-ir", FALSE}, {"$L", "test-event", FALSE}, - {"$M", "unix-socket", TRUE}, {"0", "http1.0", FALSE}, {"01", "http1.1", FALSE}, {"02", "http2", FALSE}, @@ -216,8 +215,6 @@ static const struct LongShort aliases[]= { {"Em", "tlsauthtype", TRUE}, {"En", "ssl-allow-beast", FALSE}, {"Eo", "login-options", TRUE}, - {"Ep", "pinnedpubkey", TRUE}, - {"Eq", "cert-status", FALSE}, {"f", "fail", FALSE}, {"F", "form", TRUE}, {"Fs", "form-string", TRUE}, @@ -440,7 +437,12 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ /* we can loop here if we have multiple single-letters */ if(!longopt) { - letter = (char)*parse; + if(NULL != parse) { + letter = (char)*parse; + } + else { + letter = '\0'; + } subletter='\0'; } else { @@ -595,13 +597,13 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ case 'l': /* --negotiate */ if(toggle) { - if(curlinfo->features & CURL_VERSION_SPNEGO) - config->authtype |= CURLAUTH_NEGOTIATE; + if(curlinfo->features & CURL_VERSION_GSSNEGOTIATE) + config->authtype |= CURLAUTH_GSSNEGOTIATE; else return PARAM_LIBCURL_DOESNT_SUPPORT; } else - config->authtype &= ~CURLAUTH_NEGOTIATE; + config->authtype &= ~CURLAUTH_GSSNEGOTIATE; break; case 'm': /* --ntlm */ @@ -695,7 +697,8 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ break; case 'x': /* --krb */ /* kerberos level string */ - if(curlinfo->features & CURL_VERSION_KERBEROS4) + if(curlinfo->features & (CURL_VERSION_KERBEROS4 | + CURL_VERSION_GSSNEGOTIATE)) GetStr(&config->krblevel, nextarg); else return PARAM_LIBCURL_DOESNT_SUPPORT; @@ -795,12 +798,11 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ break; case 'k': /* --proxy-negotiate */ - if(curlinfo->features & CURL_VERSION_SPNEGO) + if(curlinfo->features & CURL_VERSION_GSSNEGOTIATE) config->proxynegotiate = toggle; else return PARAM_LIBCURL_DOESNT_SUPPORT; break; - case 'm': /* --ftp-account */ GetStr(&config->ftp_account, nextarg); break; @@ -978,9 +980,6 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ warnf(config, "--test-event is ignored unless a debug build!\n"); #endif break; - case 'M': /* --unix-socket */ - GetStr(&config->unix_socket_path, nextarg); - break; } break; case '#': /* --progress-bar */ @@ -1359,15 +1358,6 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ GetStr(&config->login_options, nextarg); break; - case 'p': /* Pinned public key DER file */ - /* Pinned public key DER file */ - GetStr(&config->pinnedpubkey, nextarg); - break; - - case 'q': /* --cert-status */ - config->verifystatus = TRUE; - break; - default: /* certificate file */ { char *certname, *passphrase; @@ -1772,7 +1762,6 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ switch(*nextarg) { case '+': nextarg++; - /* FALLTHROUGH */ default: /* If-Modified-Since: (section 14.28 in RFC2068) */ config->timecond = CURL_TIMECOND_IFMODSINCE; @@ -1822,7 +1811,7 @@ ParameterError parse_args(struct GlobalConfig *config, int argc, { int i; bool stillflags; - char *orig_opt = NULL; + char *orig_opt; ParameterError result = PARAM_OK; struct OperationConfig *operation = config->first; @@ -1890,7 +1879,7 @@ ParameterError parse_args(struct GlobalConfig *config, int argc, result != PARAM_ENGINES_REQUESTED) { const char *reason = param2text(result); - if(orig_opt && !curlx_strequal(":", orig_opt)) + if(!curlx_strequal(":", orig_opt)) helpf(config->errors, "option %s: %s\n", orig_opt, reason); else helpf(config->errors, "%s\n", reason); diff --git a/src/tool_help.c b/src/tool_help.c index 4616211..1d424cb 100644 --- a/src/tool_help.c +++ b/src/tool_help.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * 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 @@ -51,16 +51,15 @@ static const char *const helptext[] = { " --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)", + " -E, --cert CERT[:PASSWD] Client certificate file and password (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", + " -K, --config FILE Specify which config file to read", " --connect-timeout SECONDS Maximum time allowed for connection", - " -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)", + " -C, --continue-at OFFSET Resumed transfer offset", + " -b, --cookie STRING/FILE String or file to read cookies from (H)", + " -c, --cookie-jar FILE Write cookies to this 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", @@ -68,17 +67,17 @@ static const char *const helptext[] = { " --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", + " --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-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 headers to FILE", + " -D, --dump-header FILE Write the headers to this file", " --egd-file FILE EGD socket path for random data (SSL)", - " --engine ENGINE Crypto engine (use \"--engine list\" for list) (SSL)", + " --engine ENGINE Crypto engine (SSL). \"--engine list\" for list", #ifdef USE_ENVIRONMENT " --environment Write results to environment variables (RISC OS)", #endif @@ -89,45 +88,44 @@ static const char *const helptext[] = { " --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-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-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, " + " --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)", + " -H, --header LINE Custom header to pass 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)", + "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)", " --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)", + " --interface INTERFACE Specify network interface/address to use", " -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", + " -j, --junk-session-cookies Ignore session cookies read from file (H)", + " --keepalive-time SECONDS Interval 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)", + " --key-type TYPE Private key file type (DER/PEM/ENG) (SSL)", + " --krb LEVEL Enable Kerberos with specified 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", + " --limit-rate RATE Limit transfer speed to this rate", " -l, --list-only List only mode (F/POP3)", - " --local-port RANGE Force use of RANGE for local port numbers", + " --local-port RANGE Force use of these local port numbers", " -L, --location Follow redirects (H)", - " --location-trusted " - "Like '--location', and send auth to other hosts (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)", @@ -137,10 +135,10 @@ static const char *const helptext[] = { " --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)", + " --negotiate Use HTTP Negotiate 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", + " --netrc-optional Use either .netrc or URL; overrides -n", + " --netrc-file FILE Set up the netrc filename to use", " -: --next " "Allows the following URL to use a separate set of options", " --no-alpn Disable the ALPN TLS extension (H)", @@ -151,10 +149,8 @@ static const char *const helptext[] = { " --noproxy List of hosts which do not use proxy", " --ntlm Use HTTP NTLM authentication (H)", " --oauth2-bearer TOKEN OAuth 2 Bearer Token (IMAP, POP3, SMTP)", - " -o, --output FILE Write to FILE instead of stdout", + " -o, --output FILE Write output to instead of stdout", " --pass PASS Pass phrase for the private key (SSL/SSH)", - " --pinnedpubkey FILE Public key (PEM/DER) to verify peer against " - "(OpenSSL/GnuTLS/GSKit only)", " --post301 " "Do not switch to GET after following a 301 redirect (H)", " --post302 " @@ -162,14 +158,14 @@ static const char *const helptext[] = { " --post303 " "Do not switch to GET after following a 303 redirect (H)", " -#, --progress-bar Display transfer progress as a progress bar", - " --proto PROTOCOLS Enable/disable PROTOCOLS", - " --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)", + " --proto PROTOCOLS Enable/disable specified protocols", + " --proto-redir PROTOCOLS " + "Enable/disable specified 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-negotiate " - "Use HTTP Negotiate (SPNEGO) authentication on the proxy (H)", + " --proxy-negotiate Use Negotiate authentication on the proxy (H)", " --proxy-ntlm Use NTLM authentication on the proxy (H)", " -U, --proxy-user USER[:PASSWORD] Proxy user and password", " --proxy1.0 HOST[:PORT] Use HTTP/1.0 proxy on given port", @@ -177,42 +173,43 @@ static const char *const helptext[] = { " --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)", + " -r, --range RANGE Retrieve only the bytes within a range", + " --raw Do HTTP \"raw\", without any transfer decoding (H)", " -e, --referer Referer URL (H)", - " -J, --remote-header-name Use the header-provided filename (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", + " --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-delay SECONDS Wait SECONDS between retries", + " --retry-delay SECONDS " + "When retrying, wait this many seconds between each", " --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)", + " -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-hostname HOST[:PORT] " "SOCKS5 proxy, pass host name to proxy", #if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) - " --socks5-gssapi-service NAME SOCKS5 proxy service name for GSS-API", + " --socks5-gssapi-service NAME SOCKS5 proxy service name for gssapi", " --socks5-gssapi-nec Compatibility with NEC SOCKS5 server", #endif " -Y, --speed-limit RATE " - "Stop transfers below RATE for 'speed-time' secs", + "Stop transfers below speed-limit for 'speed-time' secs", " -y, --speed-time SECONDS " - "Trigger 'speed-limit' abort after SECONDS (default: 30)", + "Time for trig speed-limit abort. Defaults to 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)", - " --stderr FILE Where to redirect stderr (use \"-\" for stdout)", + " --ssl-allow-beast Allow security flaw to improve interop (SSL)", + " --stderr FILE Where to redirect stderr. - means stdout", " --tcp-nodelay Use the TCP_NODELAY option", " -t, --telnet-option OPT=VAL Set telnet option", " --tftp-blksize VALUE Set TFTP BLKSIZE option (must be >512)", @@ -221,8 +218,8 @@ static const char *const helptext[] = { " --tlsv1.0 Use TLSv1.0 (SSL)", " --tlsv1.1 Use TLSv1.1 (SSL)", " --tlsv1.2 Use TLSv1.2 (SSL)", - " --trace FILE Write a debug trace to FILE", - " --trace-ascii FILE Like --trace, but without hex output", + " --trace FILE Write a debug trace to the given file", + " --trace-ascii FILE Like --trace but without the 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", @@ -230,18 +227,17 @@ static const char *const helptext[] = { " -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 FILE Connect through this Unix domain socket", - " -A, --user-agent STRING Send User-Agent STRING to server (H)", + " --tlspassword STRING TLS password", + " --tlsauthtype STRING TLS authentication type (default SRP)", + " -A, --user-agent STRING User-Agent to send 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 .curlrc (must be first parameter)", + " -w, --write-out FORMAT What to output after completion", + " --xattr Store metadata in extended file attributes", + " -q If used as the first parameter disables .curlrc", NULL }; @@ -262,21 +258,20 @@ static const struct feat feats[] = { {"AsynchDNS", CURL_VERSION_ASYNCHDNS}, {"Debug", CURL_VERSION_DEBUG}, {"TrackMemory", CURL_VERSION_CURLDEBUG}, + {"GSS-Negotiate", CURL_VERSION_GSSNEGOTIATE}, {"IDN", CURL_VERSION_IDN}, {"IPv6", CURL_VERSION_IPV6}, {"Largefile", CURL_VERSION_LARGEFILE}, - {"SSPI", CURL_VERSION_SSPI}, - {"GSS-API", CURL_VERSION_GSSAPI}, - {"Kerberos", CURL_VERSION_KERBEROS5}, - {"SPNEGO", CURL_VERSION_SPNEGO}, {"NTLM", CURL_VERSION_NTLM}, {"NTLM_WB", CURL_VERSION_NTLM_WB}, + {"SPNEGO", CURL_VERSION_SPNEGO}, {"SSL", CURL_VERSION_SSL}, + {"SSPI", CURL_VERSION_SSPI}, + {"krb4", CURL_VERSION_KERBEROS4}, {"libz", CURL_VERSION_LIBZ}, {"CharConv", CURL_VERSION_CONV}, {"TLS-SRP", CURL_VERSION_TLSAUTH_SRP}, - {"HTTP2", CURL_VERSION_HTTP2}, - {"UnixSockets", CURL_VERSION_UNIX_SOCKETS}, + {"HTTP2", CURL_VERSION_HTTP2} }; void tool_help(void) diff --git a/src/tool_hugehelp.c.cvs b/src/tool_hugehelp.c.cvs index 5895900..1c1697d 100644 --- a/src/tool_hugehelp.c.cvs +++ b/src/tool_hugehelp.c.cvs @@ -1,28 +1,5 @@ -/*************************************************************************** - * _ _ ____ _ - * 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 http://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_setup.h" #include "tool_hugehelp.h" - void hugehelp(void) { puts ( "This is a silly replacement for the actual file."); diff --git a/src/tool_libinfo.c b/src/tool_libinfo.c index a8ffb8f..81b6680 100644 --- a/src/tool_libinfo.c +++ b/src/tool_libinfo.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * 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 @@ -67,8 +67,6 @@ CURLcode get_libcurl_info(void) { "rtsp", CURLPROTO_RTSP }, { "scp", CURLPROTO_SCP }, { "sftp", CURLPROTO_SFTP }, - { "smb", CURLPROTO_SMB }, - { "smbs", CURLPROTO_SMBS }, { "smtp", CURLPROTO_SMTP }, { "smtps", CURLPROTO_SMTPS }, { "telnet", CURLPROTO_TELNET }, diff --git a/src/tool_main.c b/src/tool_main.c index 9a5ceba..8c8acc6 100644 --- a/src/tool_main.c +++ b/src/tool_main.c @@ -266,7 +266,7 @@ int main(int argc, char *argv[]) #endif #ifdef __VMS - vms_special_exit(result, vms_show); + vms_special_exit(res, vms_show); #else return (int)result; #endif diff --git a/src/tool_operate.c b/src/tool_operate.c index 35a0dd3..fd2fd6d 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * 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 @@ -202,7 +202,7 @@ static CURLcode operate_do(struct GlobalConfig *global, CURL *curl = config->easy; char *httpgetfields = NULL; - CURLcode result = CURLE_OK; + CURLcode res = CURLE_OK; unsigned long li; /* Save the values of noprogress and isatty to restore them later on */ @@ -226,7 +226,7 @@ static CURLcode operate_do(struct GlobalConfig *global, /* Check we have a url */ if(!config->url_list || !config->url_list->url) { helpf(global->errors, "no URL specified!\n"); - result = CURLE_FAILED_INIT; + res = CURLE_FAILED_INIT; goto quit_curl; } @@ -249,7 +249,7 @@ static CURLcode operate_do(struct GlobalConfig *global, if(!config->cacert) { curl_free(env); helpf(global->errors, "out of memory\n"); - result = CURLE_OUT_OF_MEMORY; + res = CURLE_OUT_OF_MEMORY; goto quit_curl; } } @@ -260,7 +260,7 @@ static CURLcode operate_do(struct GlobalConfig *global, if(!config->capath) { curl_free(env); helpf(global->errors, "out of memory\n"); - result = CURLE_OUT_OF_MEMORY; + res = CURLE_OUT_OF_MEMORY; goto quit_curl; } } @@ -271,7 +271,7 @@ static CURLcode operate_do(struct GlobalConfig *global, if(!config->cacert) { curl_free(env); helpf(global->errors, "out of memory\n"); - result = CURLE_OUT_OF_MEMORY; + res = CURLE_OUT_OF_MEMORY; goto quit_curl; } } @@ -282,8 +282,8 @@ static CURLcode operate_do(struct GlobalConfig *global, curl_free(env); #ifdef WIN32 else { - result = FindWin32CACert(config, "curl-ca-bundle.crt"); - if(result) + res = FindWin32CACert(config, "curl-ca-bundle.crt"); + if(res) goto quit_curl; } #endif @@ -296,19 +296,19 @@ static CURLcode operate_do(struct GlobalConfig *global, Curl_safefree(config->postfields); if(!httpgetfields) { helpf(global->errors, "out of memory\n"); - result = CURLE_OUT_OF_MEMORY; + res = CURLE_OUT_OF_MEMORY; goto quit_curl; } if(SetHTTPrequest(config, (config->no_body?HTTPREQ_HEAD:HTTPREQ_GET), &config->httpreq)) { - result = CURLE_FAILED_INIT; + res = CURLE_FAILED_INIT; goto quit_curl; } } else { if(SetHTTPrequest(config, HTTPREQ_SIMPLEPOST, &config->httpreq)) { - result = CURLE_FAILED_INIT; + res = CURLE_FAILED_INIT; goto quit_curl; } } @@ -321,7 +321,7 @@ static CURLcode operate_do(struct GlobalConfig *global, FILE *newfile = fopen(config->headerfile, "wb"); if(!newfile) { warnf(config, "Failed to open %s\n", config->headerfile); - result = CURLE_WRITE_ERROR; + res = CURLE_WRITE_ERROR; goto quit_curl; } else { @@ -389,7 +389,7 @@ static CURLcode operate_do(struct GlobalConfig *global, outfiles = strdup(urlnode->outfile); if(!outfiles) { helpf(global->errors, "out of memory\n"); - result = CURLE_OUT_OF_MEMORY; + res = CURLE_OUT_OF_MEMORY; break; } } @@ -398,9 +398,9 @@ static CURLcode operate_do(struct GlobalConfig *global, if(!config->globoff && infiles) { /* Unless explicitly shut off */ - result = glob_url(&inglob, infiles, &infilenum, - global->showerror?global->errors:NULL); - if(result) { + res = (CURLcode) glob_url(&inglob, infiles, &infilenum, + global->showerror?global->errors:NULL); + if(res) { Curl_safefree(outfiles); break; } @@ -423,15 +423,15 @@ static CURLcode operate_do(struct GlobalConfig *global, Curl_nop_stmt; else { if(inglob) { - result = glob_next_url(&uploadfile, inglob); - if(result == CURLE_OUT_OF_MEMORY) + res = (CURLcode) glob_next_url(&uploadfile, inglob); + if(res == CURLE_OUT_OF_MEMORY) helpf(global->errors, "out of memory\n"); } else if(!up) { uploadfile = strdup(infiles); if(!uploadfile) { helpf(global->errors, "out of memory\n"); - result = CURLE_OUT_OF_MEMORY; + res = CURLE_OUT_OF_MEMORY; } } else @@ -449,9 +449,9 @@ static CURLcode operate_do(struct GlobalConfig *global, if(!config->globoff) { /* Unless explicitly shut off, we expand '{...}' and '[...]' expressions and return total number of URLs in pattern set */ - result = glob_url(&urls, urlnode->url, &urlnum, - global->showerror?global->errors:NULL); - if(result) { + res = (CURLcode) glob_url(&urls, urlnode->url, &urlnum, + global->showerror?global->errors:NULL); + if(res) { Curl_safefree(uploadfile); break; } @@ -493,25 +493,25 @@ static CURLcode operate_do(struct GlobalConfig *global, filename. */ outfile = strdup(mlfile->filename); if(!outfile) { - result = CURLE_OUT_OF_MEMORY; + res = CURLE_OUT_OF_MEMORY; goto show_error; } this_url = strdup(mlres->url); if(!this_url) { - result = CURLE_OUT_OF_MEMORY; + res = CURLE_OUT_OF_MEMORY; goto show_error; } } else { if(urls) { - result = glob_next_url(&this_url, urls); - if(result) + res = (CURLcode) glob_next_url(&this_url, urls); + if(res) goto show_error; } else if(!li) { this_url = strdup(urlnode->url); if(!this_url) { - result = CURLE_OUT_OF_MEMORY; + res = CURLE_OUT_OF_MEMORY; goto show_error; } } @@ -523,7 +523,7 @@ static CURLcode operate_do(struct GlobalConfig *global, if(outfiles) { outfile = strdup(outfiles); if(!outfile) { - result = CURLE_OUT_OF_MEMORY; + res = CURLE_OUT_OF_MEMORY; goto show_error; } } @@ -540,12 +540,12 @@ static CURLcode operate_do(struct GlobalConfig *global, if(!outfile) { /* extract the file name from the URL */ - result = get_url_file_name(&outfile, this_url); - if(result) + res = get_url_file_name(&outfile, this_url); + if(res) goto show_error; - if(!*outfile && !config->content_disposition) { + if((!outfile || !*outfile) && !config->content_disposition) { helpf(global->errors, "Remote file name has no length!\n"); - result = CURLE_WRITE_ERROR; + res = CURLE_WRITE_ERROR; goto quit_urls; } #if defined(MSDOS) || defined(WIN32) @@ -553,7 +553,7 @@ static CURLcode operate_do(struct GlobalConfig *global, bad characters in the file name before using it */ outfile = sanitize_dos_name(outfile); if(!outfile) { - result = CURLE_OUT_OF_MEMORY; + res = CURLE_OUT_OF_MEMORY; goto show_error; } #endif /* MSDOS || WIN32 */ @@ -561,9 +561,9 @@ static CURLcode operate_do(struct GlobalConfig *global, else if(urls) { /* fill '#1' ... '#9' terms from URL pattern */ char *storefile = outfile; - result = glob_match_url(&outfile, storefile, urls); + res = (CURLcode) glob_match_url(&outfile, storefile, urls); Curl_safefree(storefile); - if(result) { + if(res) { /* bad globbing */ warnf(config, "bad output glob!\n"); goto quit_urls; @@ -574,11 +574,11 @@ static CURLcode operate_do(struct GlobalConfig *global, file output call */ if(config->create_dirs || metalink) { - result = create_dir_hierarchy(outfile, global->errors); + res = create_dir_hierarchy(outfile, global->errors); /* create_dir_hierarchy shows error upon CURLE_WRITE_ERROR */ - if(result == CURLE_WRITE_ERROR) + if(res == CURLE_WRITE_ERROR) goto quit_urls; - if(result) { + if(res) { goto show_error; } } @@ -614,7 +614,7 @@ static CURLcode operate_do(struct GlobalConfig *global, #endif if(!file) { helpf(global->errors, "Can't open '%s'!\n", outfile); - result = CURLE_WRITE_ERROR; + res = CURLE_WRITE_ERROR; goto quit_urls; } outs.fopened = TRUE; @@ -636,7 +636,7 @@ static CURLcode operate_do(struct GlobalConfig *global, this_url = add_file_name_to_url(curl, this_url, uploadfile); if(!this_url) { - result = CURLE_OUT_OF_MEMORY; + res = CURLE_OUT_OF_MEMORY; goto show_error; } /* VMS Note: @@ -680,7 +680,7 @@ static CURLcode operate_do(struct GlobalConfig *global, close(infd); infd = STDIN_FILENO; } - result = CURLE_READ_ERROR; + res = CURLE_READ_ERROR; goto quit_urls; } infdopen = TRUE; @@ -780,7 +780,7 @@ static CURLcode operate_do(struct GlobalConfig *global, urlbuffer = aprintf("%s/?%s", this_url, httpgetfields); if(!urlbuffer) { - result = CURLE_OUT_OF_MEMORY; + res = CURLE_OUT_OF_MEMORY; goto show_error; } @@ -1025,9 +1025,6 @@ static CURLcode operate_do(struct GlobalConfig *global, if(config->crlfile) my_setopt_str(curl, CURLOPT_CRLFILE, config->crlfile); - if(config->pinnedpubkey) - my_setopt_str(curl, CURLOPT_PINNEDPUBLICKEY, config->pinnedpubkey); - if(curlinfo->features & CURL_VERSION_SSL) { if(config->insecure_ok) { my_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L); @@ -1038,30 +1035,27 @@ static CURLcode operate_do(struct GlobalConfig *global, /* libcurl default is strict verifyhost -> 2L */ /* my_setopt(curl, CURLOPT_SSL_VERIFYHOST, 2L); */ } - - if(config->verifystatus) - my_setopt(curl, CURLOPT_SSL_VERIFYSTATUS, 1L); } if(built_in_protos & (CURLPROTO_SCP|CURLPROTO_SFTP)) { if(!config->insecure_ok) { char *home; char *file; - result = CURLE_OUT_OF_MEMORY; + res = CURLE_OUT_OF_MEMORY; home = homedir(); if(home) { file = aprintf("%s/%sssh/known_hosts", home, DOT_CHAR); if(file) { /* new in curl 7.19.6 */ - result = res_setopt_str(curl, CURLOPT_SSH_KNOWNHOSTS, file); + res = res_setopt_str(curl, CURLOPT_SSH_KNOWNHOSTS, file); curl_free(file); - if(result == CURLE_UNKNOWN_OPTION) + if(res == CURLE_UNKNOWN_OPTION) /* libssh2 version older than 1.1.1 */ - result = CURLE_OK; + res = CURLE_OK; } Curl_safefree(home); } - if(result) + if(res) goto show_error; } } @@ -1158,8 +1152,8 @@ static CURLcode operate_do(struct GlobalConfig *global, /* new in curl 7.9.3 */ if(config->engine) { - result = res_setopt_str(curl, CURLOPT_SSLENGINE, config->engine); - if(result) + res = res_setopt_str(curl, CURLOPT_SSLENGINE, config->engine); + if(res) goto show_error; my_setopt(curl, CURLOPT_SSLENGINE_DEFAULT, 1L); } @@ -1334,11 +1328,6 @@ static CURLcode operate_do(struct GlobalConfig *global, my_setopt(curl, CURLOPT_SSL_ENABLE_ALPN, 0L); } - /* new in 7.40.0 */ - if(config->unix_socket_path) - my_setopt_str(curl, CURLOPT_UNIX_SOCKET_PATH, - config->unix_socket_path); - /* initialize retry vars for loop below */ retry_sleep_default = (config->retry_delay) ? config->retry_delay*1000L : RETRY_SLEEP_DEFAULT; /* ms */ @@ -1348,8 +1337,8 @@ static CURLcode operate_do(struct GlobalConfig *global, retrystart = tvnow(); #ifndef CURL_DISABLE_LIBCURL_OPTION - result = easysrc_perform(); - if(result) { + res = easysrc_perform(); + if(res) { goto show_error; } #endif @@ -1362,7 +1351,7 @@ static CURLcode operate_do(struct GlobalConfig *global, metalink_parser_context_delete(outs.metalink_parser); outs.metalink_parser = metalink_parser_context_new(); if(outs.metalink_parser == NULL) { - result = CURLE_OUT_OF_MEMORY; + res = CURLE_OUT_OF_MEMORY; goto show_error; } fprintf(config->global->errors, @@ -1376,10 +1365,10 @@ static CURLcode operate_do(struct GlobalConfig *global, #ifdef CURLDEBUG if(config->test_event_based) - result = curl_easy_perform_ev(curl); + res = curl_easy_perform_ev(curl); else #endif - result = curl_easy_perform(curl); + res = curl_easy_perform(curl); if(outs.is_cd_filename && outs.stream && !global->mute && outs.filename) @@ -1399,15 +1388,15 @@ static CURLcode operate_do(struct GlobalConfig *global, RETRY_LAST /* not used */ } retry = RETRY_NO; long response; - if((CURLE_OPERATION_TIMEDOUT == result) || - (CURLE_COULDNT_RESOLVE_HOST == result) || - (CURLE_COULDNT_RESOLVE_PROXY == result) || - (CURLE_FTP_ACCEPT_TIMEOUT == result)) + if((CURLE_OPERATION_TIMEDOUT == res) || + (CURLE_COULDNT_RESOLVE_HOST == res) || + (CURLE_COULDNT_RESOLVE_PROXY == res) || + (CURLE_FTP_ACCEPT_TIMEOUT == res)) /* retry timeout always */ retry = RETRY_TIMEOUT; - else if((CURLE_OK == result) || + else if((CURLE_OK == res) || (config->failonerror && - (CURLE_HTTP_RETURNED_ERROR == result))) { + (CURLE_HTTP_RETURNED_ERROR == res))) { /* If it returned OK. _or_ failonerror was enabled and it returned due to such an error, check for HTTP transient errors to retry on. */ @@ -1438,7 +1427,7 @@ static CURLcode operate_do(struct GlobalConfig *global, } } } /* if CURLE_OK */ - else if(result) { + else if(res) { curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response); if(response/100 == 4) @@ -1482,7 +1471,7 @@ static CURLcode operate_do(struct GlobalConfig *global, if(!global->mute) fprintf(global->errors, "failed to truncate, exiting\n"); - result = CURLE_WRITE_ERROR; + res = CURLE_WRITE_ERROR; goto quit_urls; } /* now seek to the end of the file, the position where we @@ -1505,7 +1494,7 @@ static CURLcode operate_do(struct GlobalConfig *global, not. Basically, we want to try the next resource if download was not successful. */ long response; - if(CURLE_OK == result) { + if(CURLE_OK == res) { /* TODO We want to try next resource when download was not successful. How to know that? */ char *effective_url = NULL; @@ -1529,7 +1518,7 @@ static CURLcode operate_do(struct GlobalConfig *global, "Metalink: fetching (%s) from (%s) FAILED (%s)\n", mlfile->filename, this_url, (errorbuffer[0]) ? - errorbuffer : curl_easy_strerror(result)); + errorbuffer : curl_easy_strerror((CURLcode)res)); } } if(metalink && !metalink_next_res) @@ -1570,10 +1559,10 @@ static CURLcode operate_do(struct GlobalConfig *global, } else #endif - if(result && global->showerror) { - fprintf(global->errors, "curl: (%d) %s\n", result, (errorbuffer[0]) ? - errorbuffer : curl_easy_strerror(result)); - if(result == CURLE_SSL_CACERT) + if(res && global->showerror) { + fprintf(global->errors, "curl: (%d) %s\n", res, (errorbuffer[0]) ? + errorbuffer : curl_easy_strerror((CURLcode)res)); + if(res == CURLE_SSL_CACERT) fprintf(global->errors, "%s%s", CURL_CA_CERT_ERRORMSG1, CURL_CA_CERT_ERRORMSG2); } @@ -1594,7 +1583,7 @@ static CURLcode operate_do(struct GlobalConfig *global, quit_urls: /* Set file extended attributes */ - if(!result && config->xattr && outs.fopened && outs.stream) { + if(!res && config->xattr && outs.fopened && outs.stream) { int rc = fwrite_xattr(curl, fileno(outs.stream)); if(rc) warnf(config, "Error setting extended attributes: %s\n", @@ -1604,24 +1593,24 @@ static CURLcode operate_do(struct GlobalConfig *global, /* Close the file */ if(outs.fopened && outs.stream) { int rc = fclose(outs.stream); - if(!result && rc) { + if(!res && rc) { /* something went wrong in the writing process */ - result = CURLE_WRITE_ERROR; - fprintf(global->errors, "(%d) Failed writing body\n", result); + res = CURLE_WRITE_ERROR; + fprintf(global->errors, "(%d) Failed writing body\n", res); } } else if(!outs.s_isreg && outs.stream) { /* Dump standard stream buffered data */ int rc = fflush(outs.stream); - if(!result && rc) { + if(!res && rc) { /* something went wrong in the writing process */ - result = CURLE_WRITE_ERROR; - fprintf(global->errors, "(%d) Failed writing body\n", result); + res = CURLE_WRITE_ERROR; + fprintf(global->errors, "(%d) Failed writing body\n", res); } } #ifdef __AMIGA__ - if(!result && outs.s_isreg && outs.filename) { + if(!res && outs.s_isreg && outs.filename) { /* Set the url (up to 80 chars) as comment for the file */ if(strlen(url) > 78) url[79] = '\0'; @@ -1631,7 +1620,7 @@ static CURLcode operate_do(struct GlobalConfig *global, #ifdef HAVE_UTIME /* File time can only be set _after_ the file has been closed */ - if(!result && config->remote_time && outs.s_isreg && outs.filename) { + if(!res && config->remote_time && outs.s_isreg && outs.filename) { /* Ask libcurl if we got a remote file time */ long filetime = -1; curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime); @@ -1645,7 +1634,7 @@ static CURLcode operate_do(struct GlobalConfig *global, #endif #ifdef USE_METALINK - if(!metalink && config->use_metalink && result == CURLE_OK) { + if(!metalink && config->use_metalink && res == CURLE_OK) { int rv = parse_metalink(config, &outs, this_url); if(rv == 0) fprintf(config->global->errors, "Metalink: parsing (%s) OK\n", @@ -1654,7 +1643,7 @@ static CURLcode operate_do(struct GlobalConfig *global, fprintf(config->global->errors, "Metalink: parsing (%s) FAILED\n", this_url); } - else if(metalink && result == CURLE_OK && !metalink_next_res) { + else if(metalink && res == CURLE_OK && !metalink_next_res) { int rv = metalink_check_hash(global, mlfile, outs.filename); if(rv == 0) { metalink_next_res = 1; @@ -1682,7 +1671,7 @@ static CURLcode operate_do(struct GlobalConfig *global, if(metalink) { /* Should exit if error is fatal. */ - if(is_fatal_error(result)) { + if(is_fatal_error(res)) { break; } if(!metalink_next_res) @@ -1697,10 +1686,10 @@ static CURLcode operate_do(struct GlobalConfig *global, else if(urlnum > 1) { /* when url globbing, exit loop upon critical error */ - if(is_fatal_error(result)) + if(is_fatal_error(res)) break; } - else if(result) + else if(res) /* when not url globbing, exit loop upon any error */ break; @@ -1718,10 +1707,10 @@ static CURLcode operate_do(struct GlobalConfig *global, if(infilenum > 1) { /* when file globbing, exit loop upon critical error */ - if(is_fatal_error(result)) + if(is_fatal_error(res)) break; } - else if(result) + else if(res) /* when not file globbing, exit loop upon any error */ break; @@ -1747,7 +1736,7 @@ static CURLcode operate_do(struct GlobalConfig *global, /* ** Bail out upon critical errors */ - if(is_fatal_error(result)) + if(is_fatal_error(res)) goto quit_curl; } /* for-loop through all URLs */ @@ -1780,7 +1769,7 @@ static CURLcode operate_do(struct GlobalConfig *global, /* Release metalink related resources here */ clean_metalink(config); - return result; + return res; } CURLcode operate(struct GlobalConfig *config, int argc, argv_item_t argv[]) @@ -1856,9 +1845,6 @@ CURLcode operate(struct GlobalConfig *config, int argc, argv_item_t argv[]) /* Cleanup the libcurl source output */ easysrc_cleanup(); - /* set current back to first so that isn't NULL */ - config->current = config->first; - /* Dump the libcurl code if previously enabled */ dumpeasysrc(config); #endif diff --git a/src/tool_operhlp.c b/src/tool_operhlp.c index abf9496..15eefab 100644 --- a/src/tool_operhlp.c +++ b/src/tool_operhlp.c @@ -140,16 +140,15 @@ CURLcode get_url_file_name(char **filename, const char *url) pc = url; pc = strrchr(pc, '/'); - if(pc) + if(pc) { /* duplicate the string beyond the slash */ pc++; - else - /* no slash => empty string */ - pc = ""; - - *filename = strdup(pc); - if(!*filename) - return CURLE_OUT_OF_MEMORY; + if(*pc) { + *filename = strdup(pc); + if(!*filename) + return CURLE_OUT_OF_MEMORY; + } + } /* 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 @@ -164,8 +163,6 @@ CURLcode get_url_file_name(char **filename, const char *url) Curl_safefree(*filename); *filename = strdup(buffer); /* clone the buffer */ curl_free(tdir); - if(!*filename) - return CURLE_OUT_OF_MEMORY; } } #endif diff --git a/src/tool_paramhlp.c b/src/tool_paramhlp.c index 0e05184..18da026 100644 --- a/src/tool_paramhlp.c +++ b/src/tool_paramhlp.c @@ -272,8 +272,6 @@ long proto2num(struct OperationConfig *config, long *val, const char *str) { "smtps", CURLPROTO_SMTPS }, { "rtsp", CURLPROTO_RTSP }, { "gopher", CURLPROTO_GOPHER }, - { "smb", CURLPROTO_SMB }, - { "smbs", CURLPROTO_SMBS }, { NULL, 0 } }; diff --git a/src/tool_parsecfg.c b/src/tool_parsecfg.c index c5d390b..7a161c3 100644 --- a/src/tool_parsecfg.c +++ b/src/tool_parsecfg.c @@ -208,7 +208,7 @@ int parseconfig(const char *filename, struct GlobalConfig *global) } } - if(!*param) { + if(param && !*param) { /* do this so getparameter can check for required parameters. Otherwise it always thinks there's a parameter. */ if(alloced_param) diff --git a/src/tool_setopt.c b/src/tool_setopt.c index a53fdc8..62d94a6 100644 --- a/src/tool_setopt.c +++ b/src/tool_setopt.c @@ -134,8 +134,6 @@ const NameValue setopt_nv_CURLPROTO[] = { NV(CURLPROTO_RTSP), NV(CURLPROTO_SCP), NV(CURLPROTO_SFTP), - NV(CURLPROTO_SMB), - NV(CURLPROTO_SMBS), NV(CURLPROTO_SMTP), NV(CURLPROTO_SMTPS), NV(CURLPROTO_TELNET), diff --git a/src/tool_setopt.h b/src/tool_setopt.h index fcba94c..cd144bc 100644 --- a/src/tool_setopt.h +++ b/src/tool_setopt.h @@ -28,8 +28,8 @@ */ #define SETOPT_CHECK(v) do { \ - result = (v); \ - if(result) \ + res = (v); \ + if(res) \ goto show_error; \ } WHILE_FALSE diff --git a/src/tool_setup.h b/src/tool_setup.h index 3d7c158..c94686f 100644 --- a/src/tool_setup.h +++ b/src/tool_setup.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * 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 @@ -67,7 +67,8 @@ #endif #ifndef HAVE_STRDUP -# include "tool_strdup.h" +# include "strdup.h" +# define strdup(ptr) curlx_strdup(ptr) #endif #endif /* HEADER_CURL_TOOL_SETUP_H */ diff --git a/src/tool_sleep.c b/src/tool_sleep.c index d023b32..49cdc71 100644 --- a/src/tool_sleep.c +++ b/src/tool_sleep.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * 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 @@ -46,7 +46,7 @@ void tool_go_sleep(long ms) #elif defined(WIN32) Sleep(ms); #elif defined(HAVE_POLL_FINE) - (void)poll((void *)0, 0, (int)ms); + poll((void *)0, 0, (int)ms); #else struct timeval timeout; timeout.tv_sec = ms / 1000L; diff --git a/src/tool_strdup.c b/src/tool_strdup.c deleted file mode 100644 index 965675c..0000000 --- a/src/tool_strdup.c +++ /dev/null @@ -1,47 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * 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 http://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_strdup.h" - -#ifndef HAVE_STRDUP -char *strdup(const char *str) -{ - size_t len; - char *newstr; - - if(!str) - return (char *)NULL; - - len = strlen(str); - - if(len >= ((size_t)-1) / sizeof(char)) - return (char *)NULL; - - newstr = malloc((len+1)*sizeof(char)); - if(!newstr) - return (char *)NULL; - - memcpy(newstr,str,(len+1)*sizeof(char)); - - return newstr; - -} -#endif diff --git a/src/tool_strdup.h b/src/tool_strdup.h deleted file mode 100644 index 83c8102..0000000 --- a/src/tool_strdup.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef HEADER_TOOL_STRDUP_H -#define HEADER_TOOL_STRDUP_H -/*************************************************************************** - * _ _ ____ _ - * 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 http://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_setup.h" - -#ifndef HAVE_STRDUP -extern char *strdup(const char *str); -#endif - -#endif /* HEADER_TOOL_STRDUP_H */ diff --git a/src/tool_urlglob.c b/src/tool_urlglob.c index b6d5591..36e83c3 100644 --- a/src/tool_urlglob.c +++ b/src/tool_urlglob.c @@ -29,12 +29,18 @@ #include "memdebug.h" /* keep this as LAST include */ +typedef enum { + GLOB_OK, + GLOB_NO_MEM = CURLE_OUT_OF_MEMORY, + GLOB_ERROR = CURLE_URL_MALFORMAT +} GlobCode; + #define GLOBERROR(string, column, code) \ glob->error = string, glob->pos = column, code void glob_cleanup(URLGlob* glob); -static CURLcode glob_fixed(URLGlob *glob, char *fixed, size_t len) +static GlobCode glob_fixed(URLGlob *glob, char *fixed, size_t len) { URLPattern *pat = &glob->pattern[glob->size]; pat->type = UPTSet; @@ -45,16 +51,16 @@ static CURLcode glob_fixed(URLGlob *glob, char *fixed, size_t len) pat->content.Set.elements = malloc(sizeof(char*)); if(!pat->content.Set.elements) - return GLOBERROR("out of memory", 0, CURLE_OUT_OF_MEMORY); + return GLOBERROR("out of memory", 0, GLOB_NO_MEM); pat->content.Set.elements[0] = malloc(len+1); if(!pat->content.Set.elements[0]) - return GLOBERROR("out of memory", 0, CURLE_OUT_OF_MEMORY); + return GLOBERROR("out of memory", 0, GLOB_NO_MEM); memcpy(pat->content.Set.elements[0], fixed, len); pat->content.Set.elements[0][len] = 0; - return CURLE_OK; + return GLOB_OK; } /* multiply @@ -70,7 +76,7 @@ static int multiply(unsigned long *amount, long with) return 0; } -static CURLcode glob_set(URLGlob *glob, char **patternp, +static GlobCode glob_set(URLGlob *glob, char **patternp, size_t *posp, unsigned long *amount, int globindex) { @@ -95,20 +101,19 @@ static CURLcode glob_set(URLGlob *glob, char **patternp, while(!done) { switch (*pattern) { case '\0': /* URL ended while set was still open */ - return GLOBERROR("unmatched brace", opos, CURLE_URL_MALFORMAT); + return GLOBERROR("unmatched brace", opos, GLOB_ERROR); case '{': case '[': /* no nested expressions at this time */ - return GLOBERROR("nested brace", *posp, CURLE_URL_MALFORMAT); + return GLOBERROR("nested brace", *posp, GLOB_ERROR); case '}': /* set element completed */ if(opattern == pattern) - return GLOBERROR("empty string within braces", *posp, - CURLE_URL_MALFORMAT); + return GLOBERROR("empty string within braces", *posp, GLOB_ERROR); /* add 1 to size since it'll be incremented below */ if(multiply(amount, pat->content.Set.size+1)) - return GLOBERROR("range overflow", 0, CURLE_URL_MALFORMAT); + return GLOBERROR("range overflow", 0, GLOB_ERROR); /* fall-through */ case ',': @@ -118,7 +123,7 @@ static CURLcode glob_set(URLGlob *glob, char **patternp, char **new_arr = realloc(pat->content.Set.elements, (pat->content.Set.size + 1) * sizeof(char*)); if(!new_arr) - return GLOBERROR("out of memory", 0, CURLE_OUT_OF_MEMORY); + return GLOBERROR("out of memory", 0, GLOB_NO_MEM); pat->content.Set.elements = new_arr; } @@ -126,12 +131,12 @@ static CURLcode glob_set(URLGlob *glob, char **patternp, pat->content.Set.elements = malloc(sizeof(char*)); if(!pat->content.Set.elements) - return GLOBERROR("out of memory", 0, CURLE_OUT_OF_MEMORY); + return GLOBERROR("out of memory", 0, GLOB_NO_MEM); pat->content.Set.elements[pat->content.Set.size] = strdup(glob->glob_buffer); if(!pat->content.Set.elements[pat->content.Set.size]) - return GLOBERROR("out of memory", 0, CURLE_OUT_OF_MEMORY); + return GLOBERROR("out of memory", 0, GLOB_NO_MEM); ++pat->content.Set.size; if(*pattern == '}') { @@ -146,7 +151,7 @@ static CURLcode glob_set(URLGlob *glob, char **patternp, break; case ']': /* illegal closing bracket */ - return GLOBERROR("unexpected close bracket", *posp, CURLE_URL_MALFORMAT); + return GLOBERROR("unexpected close bracket", *posp, GLOB_ERROR); case '\\': /* escaped character, skip '\' */ if(pattern[1]) { @@ -161,10 +166,10 @@ static CURLcode glob_set(URLGlob *glob, char **patternp, } *patternp = pattern; /* return with the new position */ - return CURLE_OK; + return GLOB_OK; } -static CURLcode glob_range(URLGlob *glob, char **patternp, +static GlobCode glob_range(URLGlob *glob, char **patternp, size_t *posp, unsigned long *amount, int globindex) { @@ -214,7 +219,7 @@ static CURLcode glob_range(URLGlob *glob, char **patternp, if((rc != 2) || (min_c >= max_c) || ((max_c - min_c) > ('z' - 'a')) || (step < 0) ) /* the pattern is not well-formed */ - return GLOBERROR("bad range", *posp, CURLE_URL_MALFORMAT); + return GLOBERROR("bad range", *posp, GLOB_ERROR); /* if there was a ":[num]" thing, use that as step or else use 1 */ pat->content.CharRange.step = step; @@ -223,7 +228,7 @@ static CURLcode glob_range(URLGlob *glob, char **patternp, if(multiply(amount, (pat->content.CharRange.max_c - pat->content.CharRange.min_c + 1))) - return GLOBERROR("range overflow", *posp, CURLE_URL_MALFORMAT); + return GLOBERROR("range overflow", *posp, GLOB_ERROR); } else if(ISDIGIT(*pattern)) { /* numeric range detected */ @@ -278,7 +283,7 @@ static CURLcode glob_range(URLGlob *glob, char **patternp, if(!endp || (min_n > max_n) || (step_n > (max_n - min_n))) /* the pattern is not well-formed */ - return GLOBERROR("bad range", *posp, CURLE_URL_MALFORMAT); + return GLOBERROR("bad range", *posp, GLOB_ERROR); /* typecasting to ints are fine here since we make sure above that we are within 31 bits */ @@ -288,13 +293,13 @@ static CURLcode glob_range(URLGlob *glob, char **patternp, if(multiply(amount, (pat->content.NumRange.max_n - pat->content.NumRange.min_n + 1))) - return GLOBERROR("range overflow", *posp, CURLE_URL_MALFORMAT); + return GLOBERROR("range overflow", *posp, GLOB_ERROR); } else - return GLOBERROR("bad range specification", *posp, CURLE_URL_MALFORMAT); + return GLOBERROR("bad range specification", *posp, GLOB_ERROR); *patternp = pattern; - return CURLE_OK; + return GLOB_OK; } static bool peek_ipv6(const char *str, size_t *skip) @@ -327,13 +332,13 @@ static bool peek_ipv6(const char *str, size_t *skip) } } -static CURLcode glob_parse(URLGlob *glob, char *pattern, +static GlobCode glob_parse(URLGlob *glob, char *pattern, size_t pos, unsigned long *amount) { /* processes a literal string component of a URL special characters '{' and '[' branch to set/range processing functions */ - CURLcode res = CURLE_OK; + GlobCode res = GLOB_OK; int globindex = 0; /* count "actual" globs */ *amount = 1; @@ -355,8 +360,7 @@ static CURLcode glob_parse(URLGlob *glob, char *pattern, break; } if(*pattern == '}' || *pattern == ']') - return GLOBERROR("unmatched close brace/bracket", pos, - CURLE_URL_MALFORMAT); + return GLOBERROR("unmatched close brace/bracket", pos, GLOB_ERROR); /* only allow \ to escape known "special letters" */ if(*pattern == '\\' && @@ -398,13 +402,12 @@ static CURLcode glob_parse(URLGlob *glob, char *pattern, } if(++glob->size > GLOB_PATTERN_NUM) - return GLOBERROR("too many globs", pos, CURLE_URL_MALFORMAT); + return GLOBERROR("too many globs", pos, GLOB_ERROR); } return res; } -CURLcode glob_url(URLGlob** glob, char* url, unsigned long *urlnum, - FILE *error) +int glob_url(URLGlob** glob, char* url, unsigned long *urlnum, FILE *error) { /* * We can deal with any-size, just make a buffer with the same length @@ -413,7 +416,7 @@ CURLcode glob_url(URLGlob** glob, char* url, unsigned long *urlnum, URLGlob *glob_expand; unsigned long amount = 0; char *glob_buffer; - CURLcode res; + GlobCode res; *glob = NULL; @@ -462,7 +465,8 @@ void glob_cleanup(URLGlob* glob) size_t i; int elem; - for(i = 0; i < glob->size; i++) { + /* the < condition is required since i underflows! */ + for(i = glob->size - 1; i < glob->size; --i) { if((glob->pattern[i].type == UPTSet) && (glob->pattern[i].content.Set.elements)) { for(elem = glob->pattern[i].content.Set.size - 1; @@ -477,10 +481,11 @@ void glob_cleanup(URLGlob* glob) Curl_safefree(glob); } -CURLcode glob_next_url(char **globbed, URLGlob *glob) +int glob_next_url(char **globbed, URLGlob *glob) { URLPattern *pat; size_t i; + size_t j; size_t len; size_t buflen = glob->urllen + 1; char *buf = glob->glob_buffer; @@ -492,11 +497,12 @@ CURLcode glob_next_url(char **globbed, URLGlob *glob) else { bool carry = TRUE; - /* implement a counter over the index ranges of all patterns, starting - with the rightmost pattern */ - for(i = 0; carry && (i < glob->size); i++) { + /* implement a counter over the index ranges of all patterns, + starting with the rightmost pattern */ + /* the < condition is required since i underflows! */ + for(i = glob->size - 1; carry && (i < glob->size); --i) { carry = FALSE; - pat = &glob->pattern[glob->size - 1 - i]; + pat = &glob->pattern[i]; switch (pat->type) { case UPTSet: if((pat->content.Set.elements) && @@ -506,9 +512,8 @@ CURLcode glob_next_url(char **globbed, URLGlob *glob) } break; case UPTCharRange: - pat->content.CharRange.ptr_c = - (char)(pat->content.CharRange.step + - (int)((unsigned char)pat->content.CharRange.ptr_c)); + pat->content.CharRange.ptr_c = (char)(pat->content.CharRange.step + + (int)((unsigned char)pat->content.CharRange.ptr_c)); if(pat->content.CharRange.ptr_c > pat->content.CharRange.max_c) { pat->content.CharRange.ptr_c = pat->content.CharRange.min_c; carry = TRUE; @@ -532,8 +537,8 @@ CURLcode glob_next_url(char **globbed, URLGlob *glob) } } - for(i = 0; i < glob->size; ++i) { - pat = &glob->pattern[i]; + for(j = 0; j < glob->size; ++j) { + pat = &glob->pattern[j]; switch(pat->type) { case UPTSet: if(pat->content.Set.elements) { @@ -568,7 +573,7 @@ CURLcode glob_next_url(char **globbed, URLGlob *glob) return CURLE_OK; } -CURLcode glob_match_url(char **result, char *filename, URLGlob *glob) +int glob_match_url(char **result, char *filename, URLGlob *glob) { char *target; size_t allocsize; diff --git a/src/tool_urlglob.h b/src/tool_urlglob.h index 7a9ec59..9fa6f83 100644 --- a/src/tool_urlglob.h +++ b/src/tool_urlglob.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , 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,9 +68,9 @@ typedef struct { size_t pos; /* column position of error or 0 */ } URLGlob; -CURLcode glob_url(URLGlob**, char*, unsigned long *, FILE *); -CURLcode glob_next_url(char **, URLGlob *); -CURLcode glob_match_url(char **, char*, URLGlob *); +int glob_url(URLGlob**, char*, unsigned long *, FILE *); +int glob_next_url(char **, URLGlob *); +int glob_match_url(char **, char*, URLGlob *); void glob_cleanup(URLGlob* glob); #endif /* HEADER_CURL_TOOL_URLGLOB_H */ diff --git a/src/tool_util.c b/src/tool_util.c index 6c26414..00d205e 100644 --- a/src/tool_util.c +++ b/src/tool_util.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * 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 @@ -33,19 +33,10 @@ struct timeval tool_tvnow(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. - ** - ** GetTickCount64() is available on Windows version from Windows Vista - ** and Windows Server 2008 up to nowadays. The resolution of the - ** function is limited to the resolution of the system timer, which - ** is typically in the range of 10 milliseconds to 16 milliseconds. */ struct timeval now; -#if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600) - ULONGLONG milliseconds = GetTickCount64(); -#else DWORD milliseconds = GetTickCount(); -#endif - now.tv_sec = (long)(milliseconds / 1000); + now.tv_sec = milliseconds / 1000; now.tv_usec = (milliseconds % 1000) * 1000; return now; } diff --git a/src/tool_xattr.c b/src/tool_xattr.c index da0cad6..b2666d9 100644 --- a/src/tool_xattr.c +++ b/src/tool_xattr.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , 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,12 +56,11 @@ int fwrite_xattr(CURL *curl, int fd) { int i = 0; int err = 0; - /* loop through all xattr-curlinfo pairs and abort on a set error */ while(err == 0 && mappings[i].attr != NULL) { char *value = NULL; - CURLcode result = curl_easy_getinfo(curl, mappings[i].info, &value); - if(!result && value) { + CURLcode rc = curl_easy_getinfo(curl, mappings[i].info, &value); + if(rc == CURLE_OK && value) { #ifdef HAVE_FSETXATTR_6 err = fsetxattr(fd, mappings[i].attr, value, strlen(value), 0, 0); #elif defined(HAVE_FSETXATTR_5) @@ -76,7 +75,6 @@ int fwrite_xattr(CURL *curl, int fd) } i++; } - return err; } #else @@ -84,7 +82,6 @@ int fwrite_xattr(CURL *curl, int fd) { (void)curl; (void)fd; - return 0; } #endif diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index acd9caa..04ab06e 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,3 +1,2 @@ -add_subdirectory(data) add_subdirectory(libtest) add_subdirectory(server) diff --git a/tests/FILEFORMAT b/tests/FILEFORMAT index c234c22..e484272 100644 --- a/tests/FILEFORMAT +++ b/tests/FILEFORMAT @@ -156,8 +156,7 @@ rtp: part [num] channel [num] size [num] connection-monitor When used, this will log [DISCONNECT] to the server.input log when the connection is disconnected. -upgrade when an HTTP upgrade header is found, the server will upgrade - to http2 + For TFTP: writedelay: [secs] delay this amount between reply packets (each packet being @@ -177,7 +176,6 @@ ftps http http-ipv6 http-proxy -http-unix https httptls+srp httptls+srp-ipv6 @@ -197,14 +195,8 @@ Give only one per line. This subsection is mandatory. A list of features that MUST be present in the client/library for this test to -be able to run. If a required feature is not present then the test will be -SKIPPED. - -Alternatively a feature can be prefixed with an exclamation mark to indicate a -feature is NOT required. If the feature is present then the test will be -SKIPPED. - -Features testable here are: +be able to run (if these features are not present, the test will be +SKIPPED). Features testable here are: axTLS crypto @@ -221,16 +213,9 @@ NTLM OpenSSL socks SSL -SSLpinning TLS-SRP TrackMemory unittest -http2 -SSPI -GSS-API -Kerberos -SPNEGO -unix-sockets as well as each protocol that curl supports. A protocol only needs to be specified if it is different from the server (useful when the server @@ -289,7 +274,7 @@ data that is defined within the section. If there's no test number found above, the HTTP test server will use the number following the last dot in the given hostname (made so that a CONNECT can still pass on test number) so that "foo.bar.123" gets treated as test case -123. Alternatively, if an IPv6 address is provided to CONNECT, the last +123. Alternatively, if an ipv6-address is provided to CONNECT, the last hexadecimal group in the address will be used as the test numer! For example the address "[1234::ff]" would be treated as test case 255. @@ -333,7 +318,6 @@ Available substitute variables include: %HOSTIP - IPv4 address of the host running this test %HTTP6PORT - IPv6 port number of the HTTP server %HTTPPIPEPORT - Port number of the HTTP pipelining server -%HTTPUNIXPATH - Path to the Unix socket of the HTTP server %HTTPPORT - Port number of the HTTP server %HTTPSPORT - Port number of the HTTPS server %HTTPTLS6PORT - IPv6 port number of the HTTP TLS server diff --git a/tests/README b/tests/README index a8b8adc..1e5a879 100644 --- a/tests/README +++ b/tests/README @@ -81,9 +81,6 @@ The cURL Test Suite machine, or just move the servers in case you have local services on any of those ports. - The HTTP server supports listening on a Unix domain socket, the default - location is 'http.sock'. - 1.4 Run 'make test'. This builds the test suite support code and invokes the diff --git a/tests/certs/Makefile.am b/tests/certs/Makefile.am index ddb5c9f..cd35bdf 100644 --- a/tests/certs/Makefile.am +++ b/tests/certs/Makefile.am @@ -40,8 +40,6 @@ CERTFILES = \ Server-localhost-sv.p12 \ Server-localhost-sv.pem \ Server-localhost-sv.prm \ - Server-localhost-sv.pub.der \ - Server-localhost-sv.pub.pem \ Server-localhost.nn-sv.crl \ Server-localhost.nn-sv.crt \ Server-localhost.nn-sv.csr \ @@ -50,8 +48,6 @@ CERTFILES = \ Server-localhost.nn-sv.key \ Server-localhost.nn-sv.pem \ Server-localhost.nn-sv.prm \ - Server-localhost.nn-sv.pub.der \ - Server-localhost.nn-sv.pub.pem \ Server-localhost0h-sv.crl \ Server-localhost0h-sv.crt \ Server-localhost0h-sv.csr \ @@ -60,9 +56,7 @@ CERTFILES = \ Server-localhost0h-sv.key \ Server-localhost0h-sv.p12 \ Server-localhost0h-sv.pem \ - Server-localhost0h-sv.prm \ - Server-localhost0h-sv.pub.der \ - Server-localhost0h-sv.pub.pem + Server-localhost0h-sv.prm SRPFILES = \ srp-verifier-conf \ diff --git a/tests/certs/Server-localhost-sv.pub.der b/tests/certs/Server-localhost-sv.pub.der deleted file mode 100644 index 7e89b51a146ecc576aa558373c92baf6391b27c3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 162 zcmV;T0A2qufuAr91_>&LNQUg6z3DX$S1=lNVbWa*>m=YnWzZ{$VNSt%eQ+y1$E6S7D_}_R8nR Q(YR$ot7l{v0s{d60g(&LNQU-4;&%f20y{~+DT~$96y}K+9bDh?Ln$_m^AzcWPqH$khLF22tES+yu2oqX5 Q?|disKMM0ssI2 diff --git a/tests/certs/Server-localhost.nn-sv.pub.pem b/tests/certs/Server-localhost.nn-sv.pub.pem deleted file mode 100644 index 3131e95..0000000 --- a/tests/certs/Server-localhost.nn-sv.pub.pem +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDT1E7bY1w/OjpeOAmU5k1wnQ2v -SeaCXQe39c2g369x8c+/1Zq9r3x4XVU/FL27LA5zndaCmtXm9iFdCJKicV+AX1zO -8MI3N3kPTT3U8oBtRzZF0dKLei4ScUtHhvWMma/nDs+1yU16dfeydAxB46u7LJ1v -VAgTWjrvfCf3PwsLcQIDAQAB ------END PUBLIC KEY----- diff --git a/tests/certs/Server-localhost0h-sv.pub.der b/tests/certs/Server-localhost0h-sv.pub.der deleted file mode 100644 index 2b071d3ad86fff7cf40733b98adee9ca43b7a148..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 162 zcmV;T0A2qufuAr91_>&LNQUL4$|utSr3`>l^)|H, 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 http://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. -# -########################################################################### - -# this list is in numerical order -TESTCASES = test1 test2 test3 test4 test5 test6 test7 test8 test9 \ -test10 test11 test12 test13 test14 test15 test16 test17 test18 test19 \ -test20 test21 test22 test23 test24 test25 test26 test27 test28 test29 \ -test30 test31 test32 test33 test34 test35 test36 test37 test38 test39 \ -test40 test41 test42 test43 test44 test45 test46 test47 test48 test49 \ -test50 test51 test52 test53 test54 test55 test56 test57 test58 test59 \ -test60 test61 test62 test63 test64 test65 test66 test67 test68 test69 \ -test70 test71 test72 test73 test74 test75 test76 test77 test78 test79 \ -test80 test81 test82 test83 test84 test85 test86 test87 test88 test89 \ -test90 test91 test92 test93 test94 test95 test96 test97 test98 test99 \ -test100 test101 test102 test103 test104 test105 test106 test107 test108 \ -test109 test110 test111 test112 test113 test114 test115 test116 test117 \ -test118 test119 test120 test121 test122 test123 test124 test125 test126 \ -test127 test128 test129 test130 test131 test132 test133 test134 test135 \ -test136 test137 test138 test139 test140 test141 test142 test143 test144 \ -test145 test146 test147 test148 test149 test150 test151 test152 test153 \ -test154 test155 test156 test157 test158 test159 test160 test161 test162 \ -test163 test164 test165 test166 test167 test168 test169 test170 test171 \ -test172 test173 test174 test175 test176 test177 test178 test179 test180 \ -test181 test182 test183 test184 test185 test186 test187 test188 test189 \ -test190 test191 test192 test193 test194 test195 test196 test197 test198 \ -test199 test200 test201 test202 test203 test204 test205 test206 test207 \ -test208 test209 test210 test211 test212 test213 test214 test215 test216 \ -test217 test218 test220 test221 test222 test223 test224 test225 \ -test226 test227 test228 test229 test231 test233 test234 \ -test235 test236 test237 test238 test239 test240 test241 test242 test243 \ - test245 test246 test247 test248 test249 test250 test251 test252 \ -test253 test254 test255 test256 test257 test258 test259 test260 test261 \ -test262 test263 test264 test265 test266 test267 test268 test269 test270 \ -test271 test272 test273 test274 test275 test276 test277 test278 test279 \ -test280 test281 test282 test283 test284 test285 test286 test287 test288 \ -test289 test290 test291 test292 test293 test294 test295 test296 test297 \ -test298 test299 test300 test301 test302 test303 test304 test305 test306 \ -test307 test308 test309 test310 test311 test312 test313 \ - test320 test321 test322 test323 test324 \ -test325 \ -test350 test351 test352 test353 test354 \ -\ -test400 test401 test402 test403 test404 test405 test406 test407 test408 \ -test409 \ -\ -test500 test501 test502 test503 test504 test505 test506 test507 test508 \ -test509 test510 test511 test512 test513 test514 test515 test516 test517 \ -test518 test519 test520 test521 test522 test523 test524 test525 test526 \ -test527 test528 test529 test530 test531 test532 test533 test534 test535 \ -test536 test537 test538 test539 test540 test541 test542 test543 test544 \ -test545 test546 test547 test548 test549 test550 test551 test552 test553 \ -test554 test555 test556 test557 test558 test560 test561 test562 \ -test563 test564 test565 test566 test567 test568 test569 test570 test571 \ -test572 test573 test574 test575 test576 test578 test579 test580 \ -test581 test582 test583 test584 test585 test586 test587 test588 \ -test590 test591 test592 test593 test594 test595 test596 test597 test598 \ -test599 test600 test601 test602 test603 test604 test605 test606 test607 \ -test608 test609 test610 test611 test612 test613 test614 test615 test616 \ -test617 test618 test619 test620 test621 test622 test623 test624 test625 \ -test626 test627 test628 test629 test630 test631 test632 test633 test634 \ -test635 test636 test637 test638 test639 test640 test641 \ -\ -test700 test701 test702 test703 test704 test705 test706 test707 test708 \ -test709 test710 test711 test712 \ -\ -test800 test801 test802 test803 test804 test805 test806 test807 test808 \ -test809 test810 test811 test812 test813 test814 test815 test816 test817 \ -test818 test819 test820 test821 test822 test823 test824 test825 test826 \ -test827 test828 test829 test830 test831 test832 test833 test834 test835 \ -test836 \ -\ -test850 test851 test852 test853 test854 test855 test856 test857 test858 \ -test859 test860 test861 test862 test863 test864 test865 test866 test867 \ -test868 test869 test870 test871 test872 test873 test874 test875 test876 \ -test877 test878 test879 test880 test881 test882 \ -\ -test900 test901 test902 test903 test904 test905 test906 test907 test908 \ -test909 test910 test911 test912 test913 test914 test915 test916 test917 \ -test918 test919 test920 test921 test922 test923 test924 test925 test926 \ -test927 test928 test929 test930 test931 test932 test933 test934 test935 \ -test936 test937 test938 test939 test940 test941 \ -\ -test1000 test1001 test1002 test1003 test1004 test1005 test1006 test1007 \ -test1008 test1009 test1010 test1011 test1012 test1013 test1014 test1015 \ -test1016 test1017 test1018 test1019 test1020 test1021 test1022 test1023 \ -test1024 test1025 test1026 test1027 test1028 test1029 test1030 test1031 \ -test1032 test1033 test1034 test1035 test1036 test1037 test1038 test1039 \ -test1040 test1041 test1042 test1043 test1044 test1045 test1046 test1047 \ -test1048 test1049 test1050 test1051 test1052 test1053 test1054 test1055 \ -test1056 test1057 test1058 test1059 test1060 test1061 test1062 test1063 \ -test1064 test1065 test1066 test1067 test1068 test1069 test1070 test1071 \ -test1072 test1073 test1074 test1075 test1076 test1077 test1078 test1079 \ -test1080 test1081 test1082 test1083 test1084 test1085 test1086 test1087 \ -test1088 test1089 test1090 test1091 test1092 test1093 test1094 test1095 \ -test1096 test1097 test1098 test1099 test1100 test1101 test1102 test1103 \ -test1104 test1105 test1106 test1107 test1108 test1109 test1110 test1111 \ -test1112 test1113 test1114 test1115 test1116 test1117 test1118 test1119 \ -test1120 test1121 test1122 test1123 test1124 test1125 test1126 test1127 \ -test1128 test1129 test1130 test1131 test1132 test1133 test1134 \ -\ -test1200 test1201 test1202 test1203 test1204 test1205 test1206 test1207 \ -test1208 test1209 test1210 test1211 test1212 test1213 test1214 test1215 \ -test1216 test1217 test1218 test1219 \ -test1220 test1221 test1222 test1223 test1224 test1225 test1226 test1227 \ -test1228 test1229 test1230 test1231 test1232 test1233 test1234 test1235 \ -test1236 test1237 test1238 test1239 test1240 \ -\ -test1300 test1301 test1302 test1303 test1304 test1305 test1306 test1307 \ -test1308 test1309 test1310 test1311 test1312 test1313 test1314 test1315 \ -test1316 test1317 test1318 test1319 test1320 test1321 \ - test1325 test1326 test1327 test1328 test1329 test1330 test1331 \ -test1332 test1333 test1334 test1335 test1336 test1337 test1338 test1339 \ -test1340 test1341 test1342 test1343 test1344 test1345 test1346 test1347 \ -test1348 test1349 test1350 test1351 test1352 test1353 test1354 test1355 \ -test1356 test1357 test1358 test1359 test1360 test1361 test1362 test1363 \ -test1364 test1365 test1366 test1367 test1368 test1369 test1370 test1371 \ -test1372 test1373 test1374 test1375 test1376 test1377 test1378 test1379 \ -test1380 test1381 test1382 test1383 test1384 test1385 test1386 test1387 \ -test1388 test1389 test1390 test1391 test1392 test1393 test1394 test1395 \ -test1396 test1397 test1398 \ -\ -test1400 test1401 test1402 test1403 test1404 test1405 test1406 test1407 \ -test1408 test1409 test1410 test1411 test1412 test1413 test1414 test1415 \ -test1416 test1417 test1418 test1419 test1420 \ -\ -test1428 test1429 test1430 test1431 test1432 test1433 test1434 test1435 \ -test1436 \ -\ -test1500 test1501 test1502 test1503 test1504 test1505 test1506 test1507 \ -test1508 test1509 test1510 test1511 test1512 test1513 test1514 test1515 \ -test1516 \ -\ -test1520 \ -\ -test1525 test1526 test1527 test1528 test1529 \ -\ -test1800 test1801 \ -\ -test1900 test1901 test1902 test1903 \ -\ -test2000 test2001 test2002 test2003 test2004 test2005 test2006 test2007 \ -test2008 test2009 test2010 test2011 test2012 test2013 test2014 test2015 \ -test2016 test2017 test2018 test2019 test2020 test2021 test2022 test2023 \ -test2024 test2025 test2026 test2027 test2028 test2029 test2030 test2031 \ -test2032 test2033 test2034 test2035 test2036 test2037 test2038 diff --git a/tests/data/test1001 b/tests/data/test1001 index 4adbd89..529e770 100644 --- a/tests/data/test1001 +++ b/tests/data/test1001 @@ -64,7 +64,6 @@ ok http -!SSPI crypto diff --git a/tests/data/test1002 b/tests/data/test1002 index 4c3bf16..c2b811f 100644 --- a/tests/data/test1002 +++ b/tests/data/test1002 @@ -63,7 +63,6 @@ ok http -!SSPI crypto diff --git a/tests/data/test1030 b/tests/data/test1030 index a0f215d..d05a092 100644 --- a/tests/data/test1030 +++ b/tests/data/test1030 @@ -60,7 +60,6 @@ This IS the real page! http -!SSPI crypto diff --git a/tests/data/test1041 b/tests/data/test1041 index c0d23c6..fa1692c 100644 --- a/tests/data/test1041 +++ b/tests/data/test1041 @@ -12,7 +12,7 @@ Content-Range # Server-side -HTTP/1.1 200 OK swsclose +HTTP/1.1 OK swsclose Date: Thu, 09 Nov 2010 14:49:00 GMT Server: test-server/fake Accept-Ranges: bytes diff --git a/tests/data/test1042 b/tests/data/test1042 index f9a2255..d532120 100644 --- a/tests/data/test1042 +++ b/tests/data/test1042 @@ -56,10 +56,10 @@ Content-Type: text/plain http -HTTP GET beyond end of entirely-downloaded file, no server resume +HTTP GET from end of entirely-downloaded file, no server resume -http://%HOSTIP:%HTTPPORT/1042 -C 200 +http://%HOSTIP:%HTTPPORT/1042 -C - 012345678 @@ -85,7 +85,7 @@ http://%HOSTIP:%HTTPPORT/1042 -C 200 GET /1042 HTTP/1.1 -Range: bytes=200- +Range: bytes=100- Host: %HOSTIP:%HTTPPORT Accept: */* diff --git a/tests/data/test1060 b/tests/data/test1060 index e4aea65..e303a89 100644 --- a/tests/data/test1060 +++ b/tests/data/test1060 @@ -868,7 +868,6 @@ daniel http -!SSPI crypto diff --git a/tests/data/test1061 b/tests/data/test1061 index a55a272..a1d7286 100644 --- a/tests/data/test1061 +++ b/tests/data/test1061 @@ -873,7 +873,6 @@ daniel http -!SSPI crypto diff --git a/tests/data/test1071 b/tests/data/test1071 index d338e2c..758457a 100644 --- a/tests/data/test1071 +++ b/tests/data/test1071 @@ -66,7 +66,6 @@ This IS the real page! http -!SSPI crypto diff --git a/tests/data/test1079 b/tests/data/test1079 index 24cd20d..c188e79 100644 --- a/tests/data/test1079 +++ b/tests/data/test1079 @@ -42,7 +42,6 @@ Content-Length: 26 http -!SSPI crypto diff --git a/tests/data/test1086 b/tests/data/test1086 index 354b2e0..402e1f9 100644 --- a/tests/data/test1086 +++ b/tests/data/test1086 @@ -6,7 +6,6 @@ EPSV RETR timeout FAILURE -flaky diff --git a/tests/data/test1095 b/tests/data/test1095 index a442120..d401b52 100644 --- a/tests/data/test1095 +++ b/tests/data/test1095 @@ -52,7 +52,6 @@ This IS the real page! http -!SSPI crypto diff --git a/tests/data/test1105 b/tests/data/test1105 index 9564775..25f194c 100644 --- a/tests/data/test1105 +++ b/tests/data/test1105 @@ -59,7 +59,8 @@ userid=myname&password=mypassword # This file was generated by libcurl! Edit at your own risk. 127.0.0.1 FALSE /we/want/ FALSE 0 foobar name -127.0.0.1 FALSE "/silly/" FALSE 0 mismatch this +.127.0.0.1 TRUE "/silly/" FALSE 0 mismatch this +.0.0.1 TRUE / FALSE 0 partmatch present diff --git a/tests/data/test1113 b/tests/data/test1113 index 8d10975..d6118ad 100644 --- a/tests/data/test1113 +++ b/tests/data/test1113 @@ -6,7 +6,6 @@ RETR LIST wildcardmatch ftplistparser -flaky diff --git a/tests/data/test1229 b/tests/data/test1229 index 77e7e8c..dcb55e8 100644 --- a/tests/data/test1229 +++ b/tests/data/test1229 @@ -52,7 +52,6 @@ This IS the real page! http -!SSPI crypto diff --git a/tests/data/test1404 b/tests/data/test1404 index 4415697..88a06ba 100644 --- a/tests/data/test1404 +++ b/tests/data/test1404 @@ -27,7 +27,7 @@ Connection: close http ---libcurl for HTTP RFC1867-type formposting - -F with three files, one with explicit type +HTTP RFC1867-type formposting - -F with three files, one with explicit type http://%HOSTIP:%HTTPPORT/we/want/1404 -F name=value -F 'file=@log/test1404.txt,log/test1404.txt;type=magic/content,log/test1404.txt' --libcurl log/test1404.c diff --git a/tests/data/test1405 b/tests/data/test1405 index 38bfd5c..9295a1b 100644 --- a/tests/data/test1405 +++ b/tests/data/test1405 @@ -30,7 +30,7 @@ REPLY FAIL 500 this might not be a failure! ftp ---libcurl for FTP with quote ops +FTP with quote ops ftp://%HOSTIP:%FTPPORT/1405 -Q "NOOP 1" -Q "+NOOP 2" -Q "-NOOP 3" -Q "*FAIL" -Q "+*FAIL HARD" --libcurl log/test1405.c diff --git a/tests/data/test1406 b/tests/data/test1406 index c80459f..6392b96 100644 --- a/tests/data/test1406 +++ b/tests/data/test1406 @@ -1,5 +1,5 @@ -# Based on test900 +# Based on test802 # N.B. --libcurl output not sufficient to deal with uploaded files. @@ -23,7 +23,7 @@ CAPA SIZE smtp ---libcurl for SMTP +SMTP From: different diff --git a/tests/data/test1407 b/tests/data/test1407 index e84463a..842778a 100644 --- a/tests/data/test1407 +++ b/tests/data/test1407 @@ -1,9 +1,8 @@ -# Based on test851 +# Based on test808 POP3 -Clear Text LIST --libcurl @@ -24,7 +23,7 @@ REPLY LIST +OK 1407 100\r\n. pop3 ---libcurl for POP3 LIST one message +POP3 LIST one message pop3://%HOSTIP:%POP3PORT/1407 -l -u user:secret --libcurl log/test1407.c diff --git a/tests/data/test1412 b/tests/data/test1412 index 971aac8..e88919d 100644 --- a/tests/data/test1412 +++ b/tests/data/test1412 @@ -74,7 +74,6 @@ This IS the real page! http -!SSPI crypto diff --git a/tests/data/test1418 b/tests/data/test1418 index de133af..fb4e91a 100644 --- a/tests/data/test1418 +++ b/tests/data/test1418 @@ -71,7 +71,6 @@ moo http -!SSPI crypto diff --git a/tests/data/test1420 b/tests/data/test1420 deleted file mode 100644 index 79ca675..0000000 --- a/tests/data/test1420 +++ /dev/null @@ -1,108 +0,0 @@ - -# Based on test800 - - -IMAP -Clear Text -FETCH ---libcurl - - - -# -# Server-side - - -From: me@somewhere -To: fake@nowhere - -body - --- - yours sincerely - - - -# -# Client-side - - -imap - - ---libcurl for IMAP FETCH message - - -'imap://%HOSTIP:%IMAPPORT/1420/;UID=1' -u user:secret --libcurl log/test1420.c - - - -# -# Verify data after the test has been "shot" - - -A001 CAPABILITY -A002 LOGIN user secret -A003 SELECT 1420 -A004 FETCH 1 BODY[] -A005 LOGOUT - - -/********* Sample code generated by the curl command line tool ********** - * All curl_easy_setopt() options are documented at: - * http://curl.haxx.se/libcurl/c/curl_easy_setopt.html - ************************************************************************/ -#include - -int main(int argc, char *argv[]) -{ - CURLcode ret; - CURL *hnd; - - hnd = curl_easy_init(); - curl_easy_setopt(hnd, CURLOPT_URL, "imap://%HOSTIP:%IMAPPORT/1420/;UID=1"); - curl_easy_setopt(hnd, CURLOPT_HEADER, 1L); - curl_easy_setopt(hnd, CURLOPT_USERPWD, "user:secret"); - curl_easy_setopt(hnd, CURLOPT_USERAGENT, "stripped"); - curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L); - curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L); - curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L); - - /* Here is a list of options the curl code used that cannot get generated - as source easily. You may select to either not use them or implement - them yourself. - - CURLOPT_WRITEDATA set to a objectpointer - CURLOPT_WRITEFUNCTION set to a functionpointer - CURLOPT_READDATA set to a objectpointer - CURLOPT_READFUNCTION set to a functionpointer - CURLOPT_SEEKDATA set to a objectpointer - CURLOPT_SEEKFUNCTION set to a functionpointer - CURLOPT_ERRORBUFFER set to a objectpointer - CURLOPT_STDERR set to a objectpointer - CURLOPT_DEBUGFUNCTION set to a functionpointer - CURLOPT_DEBUGDATA set to a objectpointer - CURLOPT_HEADERFUNCTION set to a functionpointer - CURLOPT_HEADERDATA set to a objectpointer - - */ - - ret = curl_easy_perform(hnd); - - curl_easy_cleanup(hnd); - hnd = NULL; - - return (int)ret; -} -/**** End of sample code ****/ - - -# curl's default user-agent varies with version, libraries etc. -s/(USERAGENT, \")[^\"]+/${1}stripped/ -# CURLOPT_SSL_VERIFYPEER and SSH_KNOWNHOSTS vary with configurations - just -# ignore them -$_ = '' if /CURLOPT_SSL_VERIFYPEER/ -$_ = '' if /CURLOPT_SSH_KNOWNHOSTS/ - - - diff --git a/tests/data/test1429 b/tests/data/test1429 deleted file mode 100644 index da09dca..0000000 --- a/tests/data/test1429 +++ /dev/null @@ -1,69 +0,0 @@ - - - -HTTP -HTTP GET - - - - - -HTTP/1.1 1234 OK -Date: Thu, 09 Nov 2010 14:49:00 GMT -Server: test-server/fake -Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT -ETag: "21025-dc7-39462498" -Accept-Ranges: bytes -Content-Length: 6 -Connection: close -Content-Type: text/html -Funny-head: yesyes - --foo- - - - -# -# Client-side - - -http - - - -HTTP GET with 4-digit reponse code - - -http://%HOSTIP:%HTTPPORT/1429 --write-out '%{response_code}' - - - -# -# Verify data after the test has been "shot" - - -HTTP/1.1 1234 OK -Date: Thu, 09 Nov 2010 14:49:00 GMT -Server: test-server/fake -Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT -ETag: "21025-dc7-39462498" -Accept-Ranges: bytes -Content-Length: 6 -Connection: close -Content-Type: text/html -Funny-head: yesyes - --foo- -1234 - - -^User-Agent:.* - - -GET /1429 HTTP/1.1 -Host: %HOSTIP:%HTTPPORT -Accept: */* - - - - diff --git a/tests/data/test1430 b/tests/data/test1430 deleted file mode 100644 index c5f65cf..0000000 --- a/tests/data/test1430 +++ /dev/null @@ -1,53 +0,0 @@ - - - -HTTP -HTTP GET - - - - - -HTTP/1.1 -12 OK -Date: Thu, 09 Nov 2010 14:49:00 GMT -Server: test-server/fake -Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT -ETag: "21025-dc7-39462498" -Accept-Ranges: bytes -Content-Length: 6 -Connection: close -Content-Type: text/html -Funny-head: yesyes - --foo- - - - -# -# Client-side - - -http - - -HTTP GET with negative reponse code - - -http://%HOSTIP:%HTTPPORT/1430 - - - -# -# Verify data after the test has been "shot" - - -^User-Agent:.* - - -GET /1430 HTTP/1.1 -Host: %HOSTIP:%HTTPPORT -Accept: */* - - - - diff --git a/tests/data/test1431 b/tests/data/test1431 deleted file mode 100644 index 4ea33ed..0000000 --- a/tests/data/test1431 +++ /dev/null @@ -1,53 +0,0 @@ - - - -HTTP -HTTP GET - - - - - -HTTP/1.1 2 OK -Date: Thu, 09 Nov 2010 14:49:00 GMT -Server: test-server/fake -Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT -ETag: "21025-dc7-39462498" -Accept-Ranges: bytes -Content-Length: 6 -Connection: close -Content-Type: text/html -Funny-head: yesyes - --foo- - - - -# -# Client-side - - -http - - -HTTP GET with single-digit reponse code - - -http://%HOSTIP:%HTTPPORT/1431 - - - -# -# Verify data after the test has been "shot" - - -^User-Agent:.* - - -GET /1431 HTTP/1.1 -Host: %HOSTIP:%HTTPPORT -Accept: */* - - - - diff --git a/tests/data/test1432 b/tests/data/test1432 deleted file mode 100644 index eb1d0c2..0000000 --- a/tests/data/test1432 +++ /dev/null @@ -1,54 +0,0 @@ - - - -HTTP -HTTP GET - - - - - -HTTP/1.1 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 OK -Date: Thu, 09 Nov 2010 14:49:00 GMT -Server: test-server/fake -Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT -ETag: "21025-dc7-39462498" -Accept-Ranges: bytes -Content-Length: 6 -Connection: close -Content-Type: text/html -Funny-head: yesyes - --foo- - - - -# -# Client-side - - -http - - - -HTTP GET with 100-digit reponse code and survive - - -http://%HOSTIP:%HTTPPORT/1432 - - - -# -# Verify data after the test has been "shot" - - -^User-Agent:.* - - -GET /1432 HTTP/1.1 -Host: %HOSTIP:%HTTPPORT -Accept: */* - - - - diff --git a/tests/data/test1433 b/tests/data/test1433 deleted file mode 100644 index 8634db2..0000000 --- a/tests/data/test1433 +++ /dev/null @@ -1,69 +0,0 @@ - - - -HTTP -HTTP GET - - - - - -HTTP/1.0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 200 OK -Date: Thu, 09 Nov 2010 14:49:00 GMT -Server: test-server/fake -Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT -ETag: "21025-dc7-39462498" -Accept-Ranges: bytes -Content-Length: 6 -Connection: close -Content-Type: text/html -Funny-head: yesyes - --foo- - - - -# -# Client-side - - -http - - - -HTTP GET with 100-digit subversion number in response - - -http://%HOSTIP:%HTTPPORT/1433 --write-out '%{response_code}' - - - -# -# Verify data after the test has been "shot" - - -HTTP/1.0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 200 OK -Date: Thu, 09 Nov 2010 14:49:00 GMT -Server: test-server/fake -Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT -ETag: "21025-dc7-39462498" -Accept-Ranges: bytes -Content-Length: 6 -Connection: close -Content-Type: text/html -Funny-head: yesyes - --foo- -200 - - -^User-Agent:.* - - -GET /1433 HTTP/1.1 -Host: %HOSTIP:%HTTPPORT -Accept: */* - - - - diff --git a/tests/data/test1434 b/tests/data/test1434 deleted file mode 100644 index fba104b..0000000 --- a/tests/data/test1434 +++ /dev/null @@ -1,90 +0,0 @@ - - - -HTTP -HTTP GET -Resume - - - -# Server-side - -# Some servers (e.g. Apache 1.2) respond this way to an invalid byte range - -HTTP/1.1 200 OK -Connection: close -Content-Length: 100 -Content-Type: text/plain - -012345678 -012345678 -012345678 -012345678 -012345678 -012345678 -012345678 -012345678 -012345678 -012345678 - - -# The file data that exists at the start of the test must be included in -# the verification. - -012345678 -012345678 -012345678 -012345678 -012345678 -012345678 -012345678 -012345678 -012345678 -012345678 -HTTP/1.1 200 OK -Connection: close -Content-Length: 100 -Content-Type: text/plain - - - - -# Client-side - - -http - - -HTTP GET resume at exactly the existing file size is fine - - -http://%HOSTIP:%HTTPPORT/1434 -C 100 - - -012345678 -012345678 -012345678 -012345678 -012345678 -012345678 -012345678 -012345678 -012345678 -012345678 - - - -# Verify data after the test has been "shot" - - -^User-Agent:.* - - -GET /1434 HTTP/1.1 -Range: bytes=100- -Host: %HOSTIP:%HTTPPORT -Accept: */* - - - - diff --git a/tests/data/test1435 b/tests/data/test1435 deleted file mode 100644 index bd171a4..0000000 --- a/tests/data/test1435 +++ /dev/null @@ -1,46 +0,0 @@ - - - -HTTP -HTTP GET -unix sockets - - - - - -HTTP/1.1 200 OK -Date: Sun, 16 Nov 2014 23:47:38 GMT -Content-Length: 17 - -Based on test300 - - - - - -unix-sockets - - -http-unix - - -simple HTTP GET over Unix socket - - ---unix-socket %HTTPUNIXPATH http://server-interpreted.example.com/1435 - - - - - -^User-Agent:.* - - -GET /1435 HTTP/1.1 -Host: server-interpreted.example.com -Accept: */* - - - - diff --git a/tests/data/test1436 b/tests/data/test1436 deleted file mode 100644 index e40a3bf..0000000 --- a/tests/data/test1436 +++ /dev/null @@ -1,85 +0,0 @@ - - - -HTTP -HTTP GET -unix sockets - - - - - -HTTP/1.1 200 OK -Date: Mon, 17 Nov 2014 13:42:47 GMT -Content-Length: 6 - -First - - -HTTP/1.1 200 OK -Date: Mon, 17 Nov 2014 13:42:48 GMT -Content-Length: 7 - -Second - - -HTTP/1.1 200 OK -Date: Mon, 17 Nov 2014 13:42:49 GMT -Content-Length: 6 - -Third - - - - - -unix-sockets - - -http-unix - - -HTTP requests with multiple connections over Unix socket - - ---unix-socket %HTTPUNIXPATH http://one.example.com/14360001 http://two.example.com/14360002 http://one.example.com/14360003 - - - - - -^User-Agent:.* - - -GET /14360001 HTTP/1.1 -Host: one.example.com -Accept: */* - -GET /14360002 HTTP/1.1 -Host: two.example.com -Accept: */* - -GET /14360003 HTTP/1.1 -Host: one.example.com -Accept: */* - - - -HTTP/1.1 200 OK -Date: Mon, 17 Nov 2014 13:42:47 GMT -Content-Length: 6 - -First -HTTP/1.1 200 OK -Date: Mon, 17 Nov 2014 13:42:48 GMT -Content-Length: 7 - -Second -HTTP/1.1 200 OK -Date: Mon, 17 Nov 2014 13:42:49 GMT -Content-Length: 6 - -Third - - - diff --git a/tests/data/test1511 b/tests/data/test1511 index d2b26e5..806657f 100644 --- a/tests/data/test1511 +++ b/tests/data/test1511 @@ -8,7 +8,7 @@ HTTP # Server-side -HTTP/1.1 200 OK +HTTP/1.1 200 Date: Thu, 09 Nov 2010 14:49:00 GMT Server: test-server/fakem Last-Modified: Mon, 22 Apr 2013 17:45:05 GMT @@ -20,7 +20,7 @@ Hello World -HTTP/1.1 200 OK +HTTP/1.1 200 Date: Thu, 09 Nov 2010 14:49:00 GMT Server: test-server/fakem Last-Modified: Mon, 22 Apr 2013 17:45:05 GMT @@ -28,7 +28,7 @@ Content-Type: text/html Content-Length: 12 Connection: close -HTTP/1.1 200 OK +HTTP/1.1 200 Date: Thu, 09 Nov 2010 14:49:00 GMT Server: test-server/fakem Last-Modified: Mon, 22 Apr 2013 17:45:05 GMT diff --git a/tests/data/test1520 b/tests/data/test1520 deleted file mode 100644 index 5f9344d..0000000 --- a/tests/data/test1520 +++ /dev/null @@ -1,63 +0,0 @@ - -# Based off test 901 after bug report #1456 - - -SMTP - - - -# -# Client-side - - -smtp - - -lib1520 - - - -SMTP with CRLF-dot-CRLF in data - - -From: different -To: another - - -. -. - -. - -body - - -smtp://%HOSTIP:%SMTPPORT/1520 - - - -# -# Verify data after the test has been "shot" - - -EHLO 1520 -MAIL FROM: -RCPT TO: -DATA -QUIT - - -From: different -To: another - - -.. -.. - -.. - -body -. - - - diff --git a/tests/data/test1527 b/tests/data/test1527 index 751133e..ee4887a 100644 --- a/tests/data/test1527 +++ b/tests/data/test1527 @@ -12,26 +12,26 @@ proxytunnel # Server-side -HTTP/1.1 200 OK -We-are: good - +HTTP/1.1 200 OK +We-are: good + -HTTP/1.1 200 OK swsclose -Date: Thu, 09 Nov 2010 14:49:00 GMT -Server: test-server/fake -Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT -ETag: "21025-dc7-39462498" +HTTP/1.1 200 OK swsclose +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT +ETag: "21025-dc7-39462498" -HTTP/1.1 200 OK -We-are: good - -HTTP/1.1 200 OK swsclose -Date: Thu, 09 Nov 2010 14:49:00 GMT -Server: test-server/fake -Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT -ETag: "21025-dc7-39462498" +HTTP/1.1 200 OK +We-are: good + +HTTP/1.1 200 OK swsclose +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT +ETag: "21025-dc7-39462498" @@ -45,7 +45,7 @@ http-proxy lib1527 -Check same headers are generated with CURLOPT_HEADEROPT == CURLHEADER_UNIFIED +Check same headers are generated without CURLOPT_PROXYHEADER http://the.old.moo.1527:%HTTPPORT/1527 %HOSTIP:%PROXYPORT @@ -55,21 +55,21 @@ Check same headers are generated with CURLOPT_HEADEROPT == CURLHEADER_UNIFIED # Verify data after the test has been "shot" -CONNECT the.old.moo.1527:%HTTPPORT HTTP/1.1 -Host: the.old.moo.1527:%HTTPPORT -Proxy-Connection: Keep-Alive -User-Agent: Http Agent -Expect: 100-continue - +CONNECT the.old.moo.1527:%HTTPPORT HTTP/1.1 +Host: the.old.moo.1527:%HTTPPORT +Proxy-Connection: Keep-Alive +User-Agent: Http Agent +Expect: 100-continue + -PUT /1527 HTTP/1.1 -Host: the.old.moo.1527:%HTTPPORT -Accept: */* -User-Agent: Http Agent -Expect: 100-continue -Content-Length: 13 - +PUT /1527 HTTP/1.1 +Host: the.old.moo.1527:%HTTPPORT +Accept: */* +User-Agent: Http Agent +Expect: 100-continue +Content-Length: 13 + Hello Cloud! diff --git a/tests/data/test1529 b/tests/data/test1529 deleted file mode 100644 index 33df268..0000000 --- a/tests/data/test1529 +++ /dev/null @@ -1,43 +0,0 @@ - - - -HTTP -HTTP GET -HTTP proxy - - - -# Server-side - - -HTTP/1.1 200 OK -We-are: good - - - - -# Client-side - - -http -http-proxy - - -lib1529 - - -HTTP request-injection in URL sent over proxy - - - "http://the.old.moo:%HTTPPORT/1529" %HOSTIP:%PROXYPORT - - - -# it should be detected and an error should be reported - -# 3 == CURLE_URL_MALFORMAT - -3 - - - diff --git a/tests/data/test153 b/tests/data/test153 index 89560f8..5a1db31 100644 --- a/tests/data/test153 +++ b/tests/data/test153 @@ -63,7 +63,6 @@ This IS the second real page! http -!SSPI crypto diff --git a/tests/data/test154 b/tests/data/test154 index aa7989e..89e2bd5 100644 --- a/tests/data/test154 +++ b/tests/data/test154 @@ -63,7 +63,6 @@ This IS the real page! http -!SSPI crypto diff --git a/tests/data/test167 b/tests/data/test167 index 550803a..2ce968d 100644 --- a/tests/data/test167 +++ b/tests/data/test167 @@ -43,7 +43,6 @@ Nice auth sir! http -!SSPI crypto diff --git a/tests/data/test168 b/tests/data/test168 index e46b726..e72e931 100644 --- a/tests/data/test168 +++ b/tests/data/test168 @@ -57,7 +57,6 @@ Nice auth sir! http -!SSPI crypto diff --git a/tests/data/test1800 b/tests/data/test1800 deleted file mode 100644 index b7d534e..0000000 --- a/tests/data/test1800 +++ /dev/null @@ -1,55 +0,0 @@ - - - -HTTP -http2 - - - -# Server-side - - -HTTP/1.1 200 Ignored! -Date: Thu, 09 Nov 2010 14:49:00 GMT -Server: test-server/fake -Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT -Content-Length: 6 -Connection: close -Content-Type: text/html - --foo- - - - -# Client-side - - -http - - -http2 - - -HTTP/2 upgrade refused - - -http://%HOSTIP:%HTTPPORT/1800 --http2 - - - - - - -^User-Agent:.* - - -GET /1800 HTTP/1.1 -Host: %HOSTIP:%HTTPPORT -Accept: */* -Connection: Upgrade, HTTP2-Settings -Upgrade: %H2CVER -HTTP2-Settings: AAMAAABkAAQAAP__ - - - - diff --git a/tests/data/test1801 b/tests/data/test1801 deleted file mode 100644 index 3e069f5..0000000 --- a/tests/data/test1801 +++ /dev/null @@ -1,66 +0,0 @@ - - - -HTTP -http2 - - - -# Server-side - - -HTTP/1.1 101 Switching! - -HTTP/1.1 200 OK -Date: Thu, 09 Nov 2010 14:49:00 GMT -Server: test-server/fake -Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT -Content-Length: 6 -Content-Type: text/html - -lies! - - - -HTTP/1.1 101 Switching! - - - -# listen to the upgrade request! - -upgrade - - - -# Client-side - - -http - - -http2 - - -HTTP/2 upgrade with lying server - - -http://%HOSTIP:%HTTPPORT/1801 --http2 - - - - - - -^User-Agent:.* - - -GET /1801 HTTP/1.1 -Host: %HOSTIP:%HTTPPORT -Accept: */* -Connection: Upgrade, HTTP2-Settings -Upgrade: %H2CVER -HTTP2-Settings: AAMAAABkAAQAAP__ - - - - diff --git a/tests/data/test1901 b/tests/data/test1901 index 17c04d1..c087cc3 100644 --- a/tests/data/test1901 +++ b/tests/data/test1901 @@ -4,7 +4,6 @@ HTTP pipelining multi -flaky diff --git a/tests/data/test1902 b/tests/data/test1902 index 555b486..a634c46 100644 --- a/tests/data/test1902 +++ b/tests/data/test1902 @@ -4,7 +4,6 @@ HTTP pipelining multi -flaky diff --git a/tests/data/test1903 b/tests/data/test1903 index c725618..79cae02 100644 --- a/tests/data/test1903 +++ b/tests/data/test1903 @@ -4,7 +4,6 @@ HTTP pipelining multi -flaky diff --git a/tests/data/test194 b/tests/data/test194 index 26f7f17..1010ee9 100644 --- a/tests/data/test194 +++ b/tests/data/test194 @@ -25,19 +25,6 @@ Connection: close bad - -HTTP/1.1 416 Requested Range Not Satisfiable swsclose -Date: Fri, 24 Oct 2003 21:33:12 GMT -Server: Apache/1.3.19 (Unix) (Red-Hat/Linux) mod_ssl/2.8.1 OpenSSL/0.9.6 PHP/4.3.1 -Last-Modified: Fri, 24 Oct 2003 18:01:23 GMT -ETag: "ab57a-507-3f9968f3" -Accept-Ranges: bytes -Content-Length: 4 -Content-Range: bytes */87 -Content-Type: image/gif -Connection: close - - # Client-side @@ -65,9 +52,6 @@ Host: %HOSTIP:%HTTPPORT Accept: */* -# CURLE_HTTP_RETURNED_ERROR - -22 - + diff --git a/tests/data/test2013 b/tests/data/test2013 index 0985b32..60e85f3 100644 --- a/tests/data/test2013 +++ b/tests/data/test2013 @@ -35,7 +35,7 @@ file Metalink -Metalink local XML file, attempt Unix absolute path +Metalink local XML file, attempt UNIX absolute path --metalink file://%PWD/log/test2013.metalink diff --git a/tests/data/test2014 b/tests/data/test2014 index d2dbdc7..01dc8b3 100644 --- a/tests/data/test2014 +++ b/tests/data/test2014 @@ -35,7 +35,7 @@ file Metalink -Metalink local XML file, attempt Unix path relative to current +Metalink local XML file, attempt UNIX path relative to current --metalink file://%PWD/log/test2014.metalink diff --git a/tests/data/test2015 b/tests/data/test2015 index a35f311..e4d09d5 100644 --- a/tests/data/test2015 +++ b/tests/data/test2015 @@ -35,7 +35,7 @@ file Metalink -Metalink local XML file, attempt Unix path relative to upper +Metalink local XML file, attempt UNIX path relative to upper --metalink file://%PWD/log/test2015.metalink diff --git a/tests/data/test2016 b/tests/data/test2016 index 572aa65..fbd6cd5 100644 --- a/tests/data/test2016 +++ b/tests/data/test2016 @@ -35,7 +35,7 @@ file Metalink -Metalink local XML file, attempt Unix path traversal +Metalink local XML file, attempt UNIX path traversal --metalink file://%PWD/log/test2016.metalink diff --git a/tests/data/test2017 b/tests/data/test2017 index 15fd934..52df14e 100644 --- a/tests/data/test2017 +++ b/tests/data/test2017 @@ -35,7 +35,7 @@ file Metalink -Metalink local XML file, attempt Unix home path traversal +Metalink local XML file, attempt UNIX home path traversal --metalink file://%PWD/log/test2017.metalink diff --git a/tests/data/test2018 b/tests/data/test2018 index 6d0652d..b76233e 100644 --- a/tests/data/test2018 +++ b/tests/data/test2018 @@ -35,7 +35,7 @@ file Metalink -Metalink local XML file, attempt Unix questionable file name I +Metalink local XML file, attempt UNIX questionable file name I --metalink file://%PWD/log/test2018.metalink diff --git a/tests/data/test2019 b/tests/data/test2019 index b17b3f2..cd09804 100644 --- a/tests/data/test2019 +++ b/tests/data/test2019 @@ -35,7 +35,7 @@ file Metalink -Metalink local XML file, attempt Unix questionable file name II +Metalink local XML file, attempt UNIX questionable file name II --metalink file://%PWD/log/test2019.metalink diff --git a/tests/data/test2020 b/tests/data/test2020 index 8bf85a4..f89600b 100644 --- a/tests/data/test2020 +++ b/tests/data/test2020 @@ -35,7 +35,7 @@ file Metalink -Metalink local XML file, attempt Unix questionable file name III +Metalink local XML file, attempt UNIX questionable file name III --metalink file://%PWD/log/test2020.metalink diff --git a/tests/data/test2021 b/tests/data/test2021 index 20a9224..133eb16 100644 --- a/tests/data/test2021 +++ b/tests/data/test2021 @@ -35,7 +35,7 @@ file Metalink -Metalink local XML file, attempt Unix questionable file name IV +Metalink local XML file, attempt UNIX questionable file name IV --metalink file://%PWD/log/test2021.metalink diff --git a/tests/data/test2022 b/tests/data/test2022 index 4f4efd1..8cb0df5 100644 --- a/tests/data/test2022 +++ b/tests/data/test2022 @@ -35,7 +35,7 @@ file Metalink -Metalink local XML file, attempt Unix questionable file name V +Metalink local XML file, attempt UNIX questionable file name V --metalink file://%PWD/log/test2022.metalink diff --git a/tests/data/test2024 b/tests/data/test2024 index 9c155a2..1fbb204 100644 --- a/tests/data/test2024 +++ b/tests/data/test2024 @@ -115,10 +115,6 @@ Finally, this is the real page! http - -!SSPI -crypto - libauthretry diff --git a/tests/data/test2026 b/tests/data/test2026 index b1d2341..c940b6f 100644 --- a/tests/data/test2026 +++ b/tests/data/test2026 @@ -151,10 +151,6 @@ Finally, this is the real page! http - -!SSPI -crypto - libauthretry diff --git a/tests/data/test2027 b/tests/data/test2027 index e9a62d6..c84e24b 100644 --- a/tests/data/test2027 +++ b/tests/data/test2027 @@ -174,10 +174,6 @@ Finally, this is the real page! http - -!SSPI -crypto - libauthretry diff --git a/tests/data/test2034 b/tests/data/test2034 deleted file mode 100644 index 9bf0a81..0000000 --- a/tests/data/test2034 +++ /dev/null @@ -1,58 +0,0 @@ - - - -HTTPS -HTTP GET -PEM certificate - - - -# -# Server-side - - -HTTP/1.1 200 OK -Date: Thu, 09 Nov 2010 14:49:00 GMT -Server: test-server/fake -Content-Length: 7 - -MooMoo - - - -# -# Client-side - - -SSL -SSLpinning - - -https Server-localhost-sv.pem - - -simple HTTPS GET with DER public key pinning - - ---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey %SRCDIR/certs/Server-localhost-sv.pub.der https://localhost:%HTTPSPORT/2034 - -# Ensure that we're running on localhost because we're checking the host name - -perl -e "print 'Test requires default test server host' if ( '%HOSTIP' ne '127.0.0.1' );" - - - -# -# Verify data after the test has been "shot" - - -^User-Agent:.* - - -GET /2034 HTTP/1.1 -Host: localhost:%HTTPSPORT -Accept: */* - - - - diff --git a/tests/data/test2035 b/tests/data/test2035 deleted file mode 100644 index 7002a5b..0000000 --- a/tests/data/test2035 +++ /dev/null @@ -1,44 +0,0 @@ - - - -HTTPS -HTTP GET -PEM certificate - - - -# -# Server-side - - - -# -# Client-side - - -SSL -SSLpinning - - -https Server-localhost-sv.pem - - -HTTPS wrong DER pinnedpubkey but right CN - - ---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey %SRCDIR/certs/Server-localhost-sv.der https://localhost:%HTTPSPORT/2035 - -# Ensure that we're running on localhost because we're checking the host name - -perl -e "print 'Test requires default test server host' if ( '%HOSTIP' ne '127.0.0.1' );" - - - -# -# Verify data after the test has been "shot" - - -90 - - - diff --git a/tests/data/test2036 b/tests/data/test2036 deleted file mode 100644 index 0ab8b66..0000000 --- a/tests/data/test2036 +++ /dev/null @@ -1,39 +0,0 @@ - - - -FAILURE - - -# -# Server-side - - - -# -# Client-side - - -none - - -http - - -HTTP, -O with no slash at all in the URL - - -%HOSTIP:%HTTPPORT -O - - - -# -# Verify data after the test has been "shot" - - -^User-Agent:.* - - -23 - - - diff --git a/tests/data/test2037 b/tests/data/test2037 deleted file mode 100644 index d630538..0000000 --- a/tests/data/test2037 +++ /dev/null @@ -1,58 +0,0 @@ - - - -HTTPS -HTTP GET -PEM certificate - - - -# -# Server-side - - -HTTP/1.1 200 OK -Date: Thu, 09 Nov 2010 14:49:00 GMT -Server: test-server/fake -Content-Length: 7 - -MooMoo - - - -# -# Client-side - - -SSL -SSLpinning - - -https Server-localhost-sv.pem - - -simple HTTPS GET with PEM public key pinning - - ---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey %SRCDIR/certs/Server-localhost-sv.pub.pem https://localhost:%HTTPSPORT/2037 - -# Ensure that we're running on localhost because we're checking the host name - -perl -e "print 'Test requires default test server host' if ( '%HOSTIP' ne '127.0.0.1' );" - - - -# -# Verify data after the test has been "shot" - - -^User-Agent:.* - - -GET /2037 HTTP/1.1 -Host: localhost:%HTTPSPORT -Accept: */* - - - - diff --git a/tests/data/test2038 b/tests/data/test2038 deleted file mode 100644 index 63d935a..0000000 --- a/tests/data/test2038 +++ /dev/null @@ -1,44 +0,0 @@ - - - -HTTPS -HTTP GET -PEM certificate - - - -# -# Server-side - - - -# -# Client-side - - -SSL -SSLpinning - - -https Server-localhost-sv.pem - - -HTTPS wrong PEM pinnedpubkey but right CN - - ---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey %SRCDIR/certs/Server-localhost-sv.pem https://localhost:%HTTPSPORT/2038 - -# Ensure that we're running on localhost because we're checking the host name - -perl -e "print 'Test requires default test server host' if ( '%HOSTIP' ne '127.0.0.1' );" - - - -# -# Verify data after the test has been "shot" - - -90 - - - diff --git a/tests/data/test206 b/tests/data/test206 index 5f0c885..902d0a6 100644 --- a/tests/data/test206 +++ b/tests/data/test206 @@ -71,7 +71,6 @@ daniel http -!SSPI crypto diff --git a/tests/data/test22 b/tests/data/test22 index f45f862..2e8bdec 100644 --- a/tests/data/test22 +++ b/tests/data/test22 @@ -26,7 +26,7 @@ http get HTTP with URL > 10000 bytes -%HOSTIP:%HTTPPORT/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/22 +%HOSTIP:%HTTPPORT/`perl -e "print \"a\" x 10000;"`/22 diff --git a/tests/data/test245 b/tests/data/test245 index 02a2772..8ad45d3 100644 --- a/tests/data/test245 +++ b/tests/data/test245 @@ -50,7 +50,6 @@ ok http -!SSPI crypto diff --git a/tests/data/test246 b/tests/data/test246 index cfa31db..b92c17a 100644 --- a/tests/data/test246 +++ b/tests/data/test246 @@ -60,7 +60,6 @@ ok http -!SSPI crypto diff --git a/tests/data/test258 b/tests/data/test258 index 1173707..0d95dec 100644 --- a/tests/data/test258 +++ b/tests/data/test258 @@ -56,7 +56,6 @@ ok http -!SSPI crypto diff --git a/tests/data/test259 b/tests/data/test259 index d4a8227..b9d8ef1 100644 --- a/tests/data/test259 +++ b/tests/data/test259 @@ -52,7 +52,6 @@ ok http -!SSPI crypto diff --git a/tests/data/test273 b/tests/data/test273 index c8010d9..dc52a10 100644 --- a/tests/data/test273 +++ b/tests/data/test273 @@ -52,7 +52,6 @@ This IS the real page! http -!SSPI crypto diff --git a/tests/data/test287 b/tests/data/test287 index 6b0bf6e..ec4dfeb 100644 --- a/tests/data/test287 +++ b/tests/data/test287 @@ -12,8 +12,8 @@ proxytunnel -HTTP/1.1 405 Method Not Allowed swsclose - +HTTP/1.1 405 Method Not Allowed swsclose + And you should ignore this data. @@ -28,26 +28,26 @@ http HTTP proxy CONNECT with custom User-Agent header -http://test.remote.example.com.287:%HTTPPORT/path/287 -H "User-Agent: looser/2015" --proxy http://%HOSTIP:%HTTPPORT --proxytunnel --proxy-header "User-Agent: looser/2007" +http://test.remote.example.com.287:%HTTPPORT/path/287 -H "User-Agent: looser/2007" --proxy http://%HOSTIP:%HTTPPORT --proxytunnel # Verify data after the test has been "shot" -CONNECT test.remote.example.com.287:%HTTPPORT HTTP/1.1 -Host: test.remote.example.com.287:%HTTPPORT -Proxy-Connection: Keep-Alive -User-Agent: looser/2007 - +CONNECT test.remote.example.com.287:%HTTPPORT HTTP/1.1 +Host: test.remote.example.com.287:%HTTPPORT +Proxy-Connection: Keep-Alive +User-Agent: looser/2007 + # CURLE_RECV_ERROR 56 -HTTP/1.1 405 Method Not Allowed swsclose - +HTTP/1.1 405 Method Not Allowed swsclose + diff --git a/tests/data/test31 b/tests/data/test31 index dfcac04..38af83b 100644 --- a/tests/data/test31 +++ b/tests/data/test31 @@ -51,8 +51,7 @@ Set-Cookie: novalue; domain=reallysilly Set-Cookie: test=yes; domain=foo.com; expires=Sat Feb 2 11:56:27 GMT 2030 Set-Cookie: test2=yes; domain=se; expires=Sat Feb 2 11:56:27 GMT 2030 Set-Cookie: magic=yessir; path=/silly/; HttpOnly -Set-Cookie: blexp=yesyes; domain=127.0.0.1; domain=127.0.0.1; expiry=totally bad; -Set-Cookie: partialip=nono; domain=.0.0.1; +Set-Cookie: blexp=yesyes; domain=.0.0.1; domain=.0.0.1; expiry=totally bad; boo @@ -96,34 +95,34 @@ Accept: */* # http://curl.haxx.se/docs/http-cookies.html # This file was generated by libcurl! Edit at your own risk. -127.0.0.1 FALSE /silly/ FALSE 0 ismatch this -127.0.0.1 FALSE /overwrite FALSE 0 overwrite this2 -127.0.0.1 FALSE /secure1/ TRUE 0 sec1value secure1 -127.0.0.1 FALSE /secure2/ TRUE 0 sec2value secure2 -127.0.0.1 FALSE /secure3/ TRUE 0 sec3value secure3 -127.0.0.1 FALSE /secure4/ TRUE 0 sec4value secure4 -127.0.0.1 FALSE /secure5/ TRUE 0 sec5value secure5 -127.0.0.1 FALSE /secure6/ TRUE 0 sec6value secure6 -127.0.0.1 FALSE /secure7/ TRUE 0 sec7value secure7 -127.0.0.1 FALSE /secure8/ TRUE 0 sec8value secure8 -127.0.0.1 FALSE /secure9/ TRUE 0 secure very1 -#HttpOnly_127.0.0.1 FALSE /p1/ FALSE 0 httpo1 value1 -#HttpOnly_127.0.0.1 FALSE /p2/ FALSE 0 httpo2 value2 -#HttpOnly_127.0.0.1 FALSE /p3/ FALSE 0 httpo3 value3 -#HttpOnly_127.0.0.1 FALSE /p4/ FALSE 0 httpo4 value4 -#HttpOnly_127.0.0.1 FALSE /p4/ FALSE 0 httponly myvalue1 -#HttpOnly_127.0.0.1 FALSE /p4/ TRUE 0 httpandsec myvalue2 -#HttpOnly_127.0.0.1 FALSE /p4/ TRUE 0 httpandsec2 myvalue3 -#HttpOnly_127.0.0.1 FALSE /p4/ TRUE 0 httpandsec3 myvalue4 -#HttpOnly_127.0.0.1 FALSE /p4/ TRUE 0 httpandsec4 myvalue5 -#HttpOnly_127.0.0.1 FALSE /p4/ TRUE 0 httpandsec5 myvalue6 -#HttpOnly_127.0.0.1 FALSE /p4/ TRUE 0 httpandsec6 myvalue7 -#HttpOnly_127.0.0.1 FALSE /p4/ TRUE 0 httpandsec7 myvalue8 -#HttpOnly_127.0.0.1 FALSE /p4/ TRUE 0 httpandsec8 myvalue9 -127.0.0.1 FALSE / FALSE 0 partmatch present +.127.0.0.1 TRUE /silly/ FALSE 0 ismatch this +.127.0.0.1 TRUE /overwrite FALSE 0 overwrite this2 +.127.0.0.1 TRUE /secure1/ TRUE 0 sec1value secure1 +.127.0.0.1 TRUE /secure2/ TRUE 0 sec2value secure2 +.127.0.0.1 TRUE /secure3/ TRUE 0 sec3value secure3 +.127.0.0.1 TRUE /secure4/ TRUE 0 sec4value secure4 +.127.0.0.1 TRUE /secure5/ TRUE 0 sec5value secure5 +.127.0.0.1 TRUE /secure6/ TRUE 0 sec6value secure6 +.127.0.0.1 TRUE /secure7/ TRUE 0 sec7value secure7 +.127.0.0.1 TRUE /secure8/ TRUE 0 sec8value secure8 +.127.0.0.1 TRUE /secure9/ TRUE 0 secure very1 +#HttpOnly_.127.0.0.1 TRUE /p1/ FALSE 0 httpo1 value1 +#HttpOnly_.127.0.0.1 TRUE /p2/ FALSE 0 httpo2 value2 +#HttpOnly_.127.0.0.1 TRUE /p3/ FALSE 0 httpo3 value3 +#HttpOnly_.127.0.0.1 TRUE /p4/ FALSE 0 httpo4 value4 +#HttpOnly_.127.0.0.1 TRUE /p4/ FALSE 0 httponly myvalue1 +#HttpOnly_.127.0.0.1 TRUE /p4/ TRUE 0 httpandsec myvalue2 +#HttpOnly_.127.0.0.1 TRUE /p4/ TRUE 0 httpandsec2 myvalue3 +#HttpOnly_.127.0.0.1 TRUE /p4/ TRUE 0 httpandsec3 myvalue4 +#HttpOnly_.127.0.0.1 TRUE /p4/ TRUE 0 httpandsec4 myvalue5 +#HttpOnly_.127.0.0.1 TRUE /p4/ TRUE 0 httpandsec5 myvalue6 +#HttpOnly_.127.0.0.1 TRUE /p4/ TRUE 0 httpandsec6 myvalue7 +#HttpOnly_.127.0.0.1 TRUE /p4/ TRUE 0 httpandsec7 myvalue8 +#HttpOnly_.127.0.0.1 TRUE /p4/ TRUE 0 httpandsec8 myvalue9 +.127.0.0.1 TRUE / FALSE 0 partmatch present 127.0.0.1 FALSE /we/want/ FALSE 2054030187 nodomain value #HttpOnly_127.0.0.1 FALSE /silly/ FALSE 0 magic yessir -127.0.0.1 FALSE /we/want/ FALSE 0 blexp yesyes +.0.0.1 TRUE /we/want/ FALSE 0 blexp yesyes diff --git a/tests/data/test33 b/tests/data/test33 index 9b86cd3..82cf80b 100644 --- a/tests/data/test33 +++ b/tests/data/test33 @@ -10,7 +10,7 @@ Content-Range # Server-side -HTTP/1.1 200 OK swsclose +HTTP/1.1 OK swsclose diff --git a/tests/data/test506 b/tests/data/test506 index 07bbdea..f53a680 100644 --- a/tests/data/test506 +++ b/tests/data/test506 @@ -169,42 +169,18 @@ unlock: cookie [Pigs in space]: 63 run 3: overwrite cookie 1 and 4 lock: dns [Pigs in space]: 64 unlock: dns [Pigs in space]: 65 -CLEANUP -lock: cookie [Pigs in space]: 66 -unlock: cookie [Pigs in space]: 67 -lock: share [Pigs in space]: 68 -unlock: share [Pigs in space]: 69 -CURLOPT_SHARE -lock: share [Pigs in space]: 70 -unlock: share [Pigs in space]: 71 -CURLOPT_COOKIELIST ALL -lock: cookie [Pigs in space]: 72 -unlock: cookie [Pigs in space]: 73 -CURLOPT_COOKIEJAR -CURLOPT_COOKIELIST RELOAD -lock: cookie [Pigs in space]: 74 -unlock: cookie [Pigs in space]: 75 -loaded cookies: ------------------ - .host.foo.com TRUE / FALSE 1896263787 injected yes - .foo.com TRUE / FALSE 1993463787 test1 overwritten1 - .host.foo.com TRUE / FALSE 1896263787 test2 two - .foo.com TRUE / FALSE 1896263787 test3 three - .host.foo.com TRUE / FALSE 2061978987 test4 overwritten4 - .host.foo.com TRUE / FALSE 1896263787 test5 five ------------------ try SHARE_CLEANUP... -lock: share [Pigs in space]: 76 -unlock: share [Pigs in space]: 77 +lock: share [Pigs in space]: 66 +unlock: share [Pigs in space]: 67 SHARE_CLEANUP failed, correct CLEANUP -lock: cookie [Pigs in space]: 78 -unlock: cookie [Pigs in space]: 79 -lock: share [Pigs in space]: 80 -unlock: share [Pigs in space]: 81 +lock: cookie [Pigs in space]: 68 +unlock: cookie [Pigs in space]: 69 +lock: share [Pigs in space]: 70 +unlock: share [Pigs in space]: 71 SHARE_CLEANUP -lock: share [Pigs in space]: 82 -unlock: share [Pigs in space]: 83 +lock: share [Pigs in space]: 72 +unlock: share [Pigs in space]: 73 GLOBAL_CLEANUP diff --git a/tests/data/test540 b/tests/data/test540 index a2f7364..c99f9a0 100644 --- a/tests/data/test540 +++ b/tests/data/test540 @@ -58,7 +58,6 @@ http lib540 -!SSPI crypto diff --git a/tests/data/test545 b/tests/data/test545 index f2a5dddee6a41878a9f1ad0aefebe903815e5111..0bba688aef66040f042805bc1dcc2a78cbe7b7e9 100644 GIT binary patch delta 66 zcmbQoHk)lj1*2kKX-n#=x`K0PkdJ>rNW8OuKxBY_aEP0ytB*_Y -!SSPI crypto diff --git a/tests/data/test552 b/tests/data/test552 index 61de9fe24ea82b56f4ad7a0f029bf07b1be10206..4840a2062f0bd13f6ff4c4c726087b3538a6fb47 100644 GIT binary patch delta 22 dcmeCY%h7z7V?!WYb2wXjI2+^ka5g3*4FF=R2NM7Q delta 28 jcmZp^%h7q4V?!Vtt733)fM;_6TYCT- -!SSPI crypto # tool is what to use instead of 'curl' diff --git a/tests/data/test573 b/tests/data/test573 index e3299b8..054064f 100644 --- a/tests/data/test573 +++ b/tests/data/test573 @@ -3,7 +3,6 @@ HTTP multi -flaky # diff --git a/tests/data/test574 b/tests/data/test574 index cb41f03..c158448 100644 --- a/tests/data/test574 +++ b/tests/data/test574 @@ -25,7 +25,7 @@ ftp lib574 -FTP wildcard download - changed fnmatch, 2x perform (Unix LIST response) +FTP wildcard download - changed fnmatch, 2x perform (UNIX LIST response) ftp://%HOSTIP:%FTPPORT/fully_simulated/UNIX/*.txt diff --git a/tests/data/test576 b/tests/data/test576 index 74a3aed..52a6664 100644 --- a/tests/data/test576 +++ b/tests/data/test576 @@ -22,7 +22,7 @@ ftp lib576 -FTP wildcard download - skip/parser_correctness/CURLOPT_FNMATCH_FUNCTION (Unix) +FTP wildcard download - skip/parser_correctness/CURLOPT_FNMATCH_FUNCTION (UNIX) ftp://%HOSTIP:%FTPPORT/fully_simulated/UNIX/* diff --git a/tests/data/test579 b/tests/data/test579 index e352e3d..adbb3dd 100644 --- a/tests/data/test579 +++ b/tests/data/test579 @@ -77,11 +77,12 @@ http://%HOSTIP:%HTTPPORT/579 log/ip579 Progress callback called with UL 0 out of 0 -Progress callback called with UL 8 out of 0 -Progress callback called with UL 16 out of 0 -Progress callback called with UL 26 out of 0 -Progress callback called with UL 61 out of 0 -Progress callback called with UL 66 out of 0 +Progress callback called with UL 0 out of -1 +Progress callback called with UL 8 out of -1 +Progress callback called with UL 16 out of -1 +Progress callback called with UL 26 out of -1 +Progress callback called with UL 61 out of -1 +Progress callback called with UL 66 out of -1 diff --git a/tests/data/test599 b/tests/data/test599 index 9ce8b23..c57fe5c 100644 --- a/tests/data/test599 +++ b/tests/data/test599 @@ -71,15 +71,13 @@ lib599 HTTP GET with progress callback and redirects changing content sizes -http://%HOSTIP:%HTTPPORT/599 log/ip599 +http://%HOSTIP:%HTTPPORT/599 # # Verify data after the test has been "shot" - -CL: -1 - + diff --git a/tests/data/test61 b/tests/data/test61 index e6dbbb9..d2de279 100644 --- a/tests/data/test61 +++ b/tests/data/test61 @@ -23,7 +23,6 @@ Set-Cookie: test3=maybe; domain=foo.com; path=/moo; secure Set-Cookie: test4=no; domain=nope.foo.com; path=/moo; secure Set-Cookie: test5=name; domain=anything.com; path=/ ; secure Set-Cookie: fake=fooledyou; domain=..com; path=/; -Set-Cookie: supercookie=fooledyou; domain=.com; path=/;^M Content-Length: 4 boo diff --git a/tests/data/test64 b/tests/data/test64 index 7a2e3d0..6bd82a8 100644 --- a/tests/data/test64 +++ b/tests/data/test64 @@ -52,7 +52,6 @@ This IS the real page! http -!SSPI crypto diff --git a/tests/data/test65 b/tests/data/test65 index 001d598..8582a0c 100644 --- a/tests/data/test65 +++ b/tests/data/test65 @@ -52,7 +52,6 @@ This is not the real page either http -!SSPI crypto diff --git a/tests/data/test70 b/tests/data/test70 index 74f70e1..2fc0327 100644 --- a/tests/data/test70 +++ b/tests/data/test70 @@ -52,7 +52,6 @@ This IS the real page! # Client-side -!SSPI NTLM diff --git a/tests/data/test72 b/tests/data/test72 index b90e19c..5c24271 100644 --- a/tests/data/test72 +++ b/tests/data/test72 @@ -54,7 +54,6 @@ This IS the real page! http -!SSPI crypto diff --git a/tests/data/test8 b/tests/data/test8 index 030fd55..4d54541 100644 --- a/tests/data/test8 +++ b/tests/data/test8 @@ -42,8 +42,7 @@ Set-Cookie: duplicate=test; domain=.0.0.1; domain=.0.0.1; path=/donkey; Set-Cookie: cookie=yes; path=/we; Set-Cookie: cookie=perhaps; path=/we/want; Set-Cookie: nocookie=yes; path=/WE; -Set-Cookie: blexp=yesyes; domain=%HOSTIP; domain=%HOSTIP; expiry=totally bad; -Set-Cookie: partialip=nono; domain=.0.0.1; +Set-Cookie: blexp=yesyes; domain=.0.0.1; domain=.0.0.1; expiry=totally bad; diff --git a/tests/data/test88 b/tests/data/test88 index 253b420..878b7db 100644 --- a/tests/data/test88 +++ b/tests/data/test88 @@ -56,7 +56,6 @@ This IS the real page! http -!SSPI crypto diff --git a/tests/data/test941 b/tests/data/test941 deleted file mode 100644 index fd69b87..0000000 --- a/tests/data/test941 +++ /dev/null @@ -1,66 +0,0 @@ - - - -SMTP ---crlf - - - -# -# Server-side - - - -# -# Client-side - - -smtp - - -SMTP with --crlf - - -From: different -To: another - -email -headers and body -with unix newlines -meant to be -converted -with -the ---crlf option - - -smtp://%HOSTIP:%SMTPPORT/941 --mail-rcpt recipient@example.com --mail-from sender@example.com -T log/upload941 --crlf - - - -# -# Verify data after the test has been "shot" - - -EHLO 941 -MAIL FROM: -RCPT TO: -DATA -QUIT - - -From: different -To: another - -email -headers and body -with unix newlines -meant to be -converted -with -the ---crlf option -. - - - diff --git a/tests/getpart.pm b/tests/getpart.pm index 0729cf4..4548833 100644 --- a/tests/getpart.pm +++ b/tests/getpart.pm @@ -239,7 +239,7 @@ sub writearray { } # -# Load a specified file and return it as an array +# Load a specified file an return it as an array # sub loadarray { my ($filename)=@_; diff --git a/tests/http_pipe.py b/tests/http_pipe.py index 19ebec7..c91736d 100755 --- a/tests/http_pipe.py +++ b/tests/http_pipe.py @@ -17,10 +17,7 @@ # Modified by Linus Nielsen Feltzing for inclusion in the libcurl test # framework # -try: - import socketserver -except: - import SocketServer as socketserver +import SocketServer import argparse import re import select @@ -254,21 +251,24 @@ class ResponseBuilder(object): self._processed_end = True elif path == '/1k.txt': - body = '0123456789abcdef' * 64 + str = '0123456789abcdef' + body = ''.join([str for num in xrange(64)]) result += self._BuildResponse( '200 OK', ['Server: Apache', 'Content-Length: 1024', 'Cache-Control: max-age=60'], body) elif path == '/10k.txt': - body = '0123456789abcdef' * 640 + str = '0123456789abcdef' + body = ''.join([str for num in xrange(640)]) result += self._BuildResponse( '200 OK', ['Server: Apache', 'Content-Length: 10240', 'Cache-Control: max-age=60'], body) elif path == '/100k.txt': - body = '0123456789abcdef' * 6400 + str = '0123456789abcdef' + body = ''.join([str for num in xrange(6400)]) result += self._BuildResponse( '200 OK', ['Server: Apache', @@ -277,7 +277,9 @@ class ResponseBuilder(object): body) elif path == '/100k_chunked.txt': - body = self.Chunkify('0123456789abcdef' * 6400, 20480) + str = '0123456789abcdef' + moo = ''.join([str for num in xrange(6400)]) + body = self.Chunkify(moo, 20480) body.append('0\r\n\r\n') body = ''.join(body) @@ -335,7 +337,7 @@ class ResponseBuilder(object): '%s' % (status, '\r\n'.join(headers), body)) -class PipelineRequestHandler(socketserver.BaseRequestHandler): +class PipelineRequestHandler(SocketServer.BaseRequestHandler): """Called on an incoming TCP connection.""" def _GetTimeUntilTimeout(self): @@ -405,11 +407,11 @@ class PipelineRequestHandler(socketserver.BaseRequestHandler): self.request.send(self._response_builder.WriteError( '200 OK', INFO_MESSAGE)) except Exception as e: - print(e) + print e self.request.close() -class PipelineServer(socketserver.ThreadingMixIn, socketserver.TCPServer): +class PipelineServer(SocketServer.ThreadingMixIn, SocketServer.TCPServer): pass diff --git a/tests/httpserver.pl b/tests/httpserver.pl index b60dadc..a38c3ce 100755 --- a/tests/httpserver.pl +++ b/tests/httpserver.pl @@ -36,7 +36,6 @@ use serverhelp qw( my $verbose = 0; # set to 1 for debugging my $port = 8990; # just a default -my $unix_socket; # location to place a listening Unix socket my $ipvnum = 4; # default IP version of http server my $idnum = 1; # dafault http server instance number my $proto = 'http'; # protocol the http server speaks @@ -75,13 +74,6 @@ while(@ARGV) { elsif($ARGV[0] eq '--ipv6') { $ipvnum = 6; } - elsif($ARGV[0] eq '--unix-socket') { - $ipvnum = 'unix'; - if($ARGV[1]) { - $unix_socket = $ARGV[1]; - shift @ARGV; - } - } elsif($ARGV[0] eq '--gopher') { $gopher = 1; } @@ -125,12 +117,7 @@ if(!$logfile) { $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" "; $flags .= "--gopher " if($gopher); $flags .= "--connect $connect " if($connect); -if($ipvnum eq 'unix') { - $flags .= "--unix-socket '$unix_socket' "; -} else { - $flags .= "--ipv$ipvnum --port $port "; -} -$flags .= "--srcdir \"$srcdir\""; +$flags .= "--ipv$ipvnum --port $port --srcdir \"$srcdir\""; if($verbose) { print STDERR "RUN: server/sws $flags\n"; diff --git a/tests/libtest/CMakeLists.txt b/tests/libtest/CMakeLists.txt index cc9d7e1..c06b356 100644 --- a/tests/libtest/CMakeLists.txt +++ b/tests/libtest/CMakeLists.txt @@ -9,11 +9,11 @@ function(SETUP_TEST TEST_NAME) # ARGN are the files in the test ${CURL_BINARY_DIR}/lib # To be able to reach "curl_config.h" ${CURL_BINARY_DIR}/include # To be able to reach "curl/curlbuild.h" ) - if(USE_ARES) + if(CURL_USE_ARES) include_directories(${CARES_INCLUDE_DIR}) endif() - - target_link_libraries( ${TEST_NAME} libcurl ${CURL_LIBS}) + setup_curl_dependencies(${TEST_NAME}) + target_link_libraries( ${TEST_NAME} libcurl ) set_target_properties(${TEST_NAME} PROPERTIES COMPILE_DEFINITIONS ${UPPER_TEST_NAME}) @@ -35,15 +35,6 @@ foreach(TEST_NAME ${noinst_PROGRAMS}) setup_test(${TEST_NAME} ${${TEST_NAME}_SOURCES}) endforeach() -# Allows for hostname override to make tests machine independent. -# TODO this cmake build assumes a shared build, detect static linking here! -if(NOT WIN32) - add_library(hostname MODULE sethostname.c sethostname.h) - # Output to .libs for compatibility with autotools, the test data expects a - # library at (tests)/libtest/.libs/libhostname.so - set_target_properties(hostname PROPERTIES - LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/.libs) -endif() # # files used only in some libcurl test programs # SET(TESTUTIL testutil.c testutil.h) diff --git a/tests/libtest/Makefile.inc b/tests/libtest/Makefile.inc index 3508b80..bf73036 100644 --- a/tests/libtest/Makefile.inc +++ b/tests/libtest/Makefile.inc @@ -22,8 +22,8 @@ noinst_PROGRAMS = chkhostname libauthretry libntlmconnect \ lib583 lib585 lib586 lib587 lib590 lib591 lib597 lib598 lib599 \ lib1500 lib1501 lib1502 lib1503 lib1504 lib1505 lib1506 lib1507 lib1508 \ lib1509 lib1510 lib1511 lib1512 lib1513 lib1514 lib1515 \ - lib1520 \ - lib1525 lib1526 lib1527 lib1528 lib1529 \ + lib1509 lib1510 lib1511 lib1512 lib1513 lib1514 lib1515 \ + lib1525 lib1526 lib1527 lib1528 \ lib1900 \ lib2033 @@ -195,7 +195,7 @@ lib555_SOURCES = lib555.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) lib555_LDADD = $(TESTUTIL_LIBS) lib555_CPPFLAGS = $(AM_CPPFLAGS) -lib556_SOURCES = lib556.c $(SUPPORTFILES) $(WARNLESS) +lib556_SOURCES = lib556.c $(SUPPORTFILES) lib556_CPPFLAGS = $(AM_CPPFLAGS) lib557_SOURCES = lib557.c $(SUPPORTFILES) @@ -357,9 +357,6 @@ lib1515_SOURCES = lib1515.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) lib1515_LDADD = $(TESTUTIL_LIBS) lib1515_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1515 -lib1520_SOURCES = lib1520.c $(SUPPORTFILES) -lib1520_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1520 - lib1525_SOURCES = lib1525.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) lib1525_LDADD = $(TESTUTIL_LIBS) lib1525_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1525 @@ -376,10 +373,6 @@ lib1528_SOURCES = lib1528.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) lib1528_LDADD = $(TESTUTIL_LIBS) lib1528_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1528 -lib1529_SOURCES = lib1529.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) -lib1529_LDADD = $(TESTUTIL_LIBS) -lib1529_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1529 - lib1900_SOURCES = lib1900.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) lib1900_LDADD = $(TESTUTIL_LIBS) lib1900_CPPFLAGS = $(AM_CPPFLAGS) diff --git a/tests/libtest/lib1509.c b/tests/libtest/lib1509.c index f67c7d6..3c86a36 100644 --- a/tests/libtest/lib1509.c +++ b/tests/libtest/lib1509.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , 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,7 +28,7 @@ size_t WriteOutput(void *ptr, size_t size, size_t nmemb, void *stream); size_t WriteHeader(void *ptr, size_t size, size_t nmemb, void *stream); -unsigned long realHeaderSize = 0; +long realHeaderSize = 0; int test(char *URL) { @@ -90,8 +90,7 @@ size_t WriteHeader(void *ptr, size_t size, size_t nmemb, void *stream) { (void)ptr; (void)stream; - - realHeaderSize += curlx_uztoul(size * nmemb); + realHeaderSize += size * nmemb; return nmemb * size; } diff --git a/tests/libtest/lib1520.c b/tests/libtest/lib1520.c deleted file mode 100644 index c6d2e82..0000000 --- a/tests/libtest/lib1520.c +++ /dev/null @@ -1,114 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2014, Steve Holme, . - * - * 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 http://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 "test.h" - -#include "memdebug.h" - -/* - * This is the list of basic details you need to tweak to get things right. - */ -#define TO "" -#define FROM "" - -static const char *payload_text[] = { - "From: different\r\n", - "To: another\r\n", - "\r\n", - "\r\n", - ".\r\n", - ".\r\n", - "\r\n", - ".\r\n", - "\r\n", - "body", - NULL -}; - -struct upload_status { - int lines_read; -}; - -static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp) -{ - struct upload_status *upload_ctx = (struct upload_status *)userp; - const char *data; - - if((size == 0) || (nmemb == 0) || ((size*nmemb) < 1)) { - return 0; - } - - data = payload_text[upload_ctx->lines_read]; - - if(data) { - size_t len = strlen(data); - memcpy(ptr, data, len); - upload_ctx->lines_read++; - - return len; - } - - return 0; -} - -int test(char *URL) -{ - CURLcode res; - CURL *curl; - struct curl_slist *rcpt_list = NULL; - struct upload_status upload_ctx = {0}; - - if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { - fprintf(stderr, "curl_global_init() failed\n"); - return TEST_ERR_MAJOR_BAD; - } - - if((curl = curl_easy_init()) == NULL) { - fprintf(stderr, "curl_easy_init() failed\n"); - curl_global_cleanup(); - return TEST_ERR_MAJOR_BAD; - } - - rcpt_list = curl_slist_append(rcpt_list, TO); - /* more addresses can be added here - rcpt_list = curl_slist_append(rcpt_list, ""); - */ - - test_setopt(curl, CURLOPT_URL, URL); - test_setopt(curl, CURLOPT_UPLOAD, 1L); - test_setopt(curl, CURLOPT_READFUNCTION, read_callback); - test_setopt(curl, CURLOPT_READDATA, &upload_ctx); - test_setopt(curl, CURLOPT_MAIL_FROM, FROM); - test_setopt(curl, CURLOPT_MAIL_RCPT, rcpt_list); - test_setopt(curl, CURLOPT_VERBOSE, 1L); - - res = curl_easy_perform(curl); - -test_cleanup: - - curl_slist_free_all(rcpt_list); - curl_easy_cleanup(curl); - curl_global_cleanup(); - - return (int)res; -} - - diff --git a/tests/libtest/lib1527.c b/tests/libtest/lib1527.c index 1122d8e..280c947 100644 --- a/tests/libtest/lib1527.c +++ b/tests/libtest/lib1527.c @@ -83,7 +83,6 @@ int test(char *URL) test_setopt(curl, CURLOPT_READFUNCTION, read_callback); test_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, 1L); test_setopt(curl, CURLOPT_INFILESIZE, strlen(data)); - test_setopt(curl, CURLOPT_HEADEROPT, CURLHEADER_UNIFIED); res = curl_easy_perform(curl); diff --git a/tests/libtest/lib1529.c b/tests/libtest/lib1529.c deleted file mode 100644 index 3def142..0000000 --- a/tests/libtest/lib1529.c +++ /dev/null @@ -1,59 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * 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 http://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 "test.h" - -#include "memdebug.h" - -int test(char *URL) -{ - CURL *curl = NULL; - CURLcode res = CURLE_FAILED_INIT; - char bURL[512]; - snprintf(bURL, sizeof(bURL), "%s HTTP/1.1\r\nGET http://1529.com/1529", URL); - - if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { - fprintf(stderr, "curl_global_init() failed\n"); - return TEST_ERR_MAJOR_BAD; - } - - if((curl = curl_easy_init()) == NULL) { - fprintf(stderr, "curl_easy_init() failed\n"); - curl_global_cleanup(); - return TEST_ERR_MAJOR_BAD; - } - - test_setopt(curl, CURLOPT_URL, bURL); - test_setopt(curl, CURLOPT_PROXY, libtest_arg2); - test_setopt(curl, CURLOPT_VERBOSE, 1L); - test_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); - test_setopt(curl, CURLOPT_HEADER, 1L); - - res = curl_easy_perform(curl); - -test_cleanup: - - curl_easy_cleanup(curl); - curl_global_cleanup(); - - return (int)res; -} diff --git a/tests/libtest/lib1900.c b/tests/libtest/lib1900.c index 2f64742..fa83130 100644 --- a/tests/libtest/lib1900.c +++ b/tests/libtest/lib1900.c @@ -179,7 +179,7 @@ int test(char *URL) now = tutil_tvnow(); msnow = now.tv_sec * 1000 + now.tv_usec / 1000; mslast = last_handle_add.tv_sec * 1000 + last_handle_add.tv_usec / 1000; - if((msnow - mslast) >= urltime[handlenum]) { + if(msnow - mslast >= urltime[handlenum] && handlenum < num_handles) { fprintf(stdout, "Adding handle %d\n", handlenum); setup_handle(URL, m, handlenum); last_handle_add = now; diff --git a/tests/libtest/lib506.c b/tests/libtest/lib506.c index 4dad0d9..4a3ec5a 100644 --- a/tests/libtest/lib506.c +++ b/tests/libtest/lib506.c @@ -175,14 +175,11 @@ int test(char *URL) { int res; CURLSHcode scode = CURLSHE_OK; - CURLcode code = CURLE_OK; char *url = NULL; struct Tdata tdata; CURL *curl; CURLSH *share; struct curl_slist *headers = NULL; - struct curl_slist *cookies = NULL; - struct curl_slist *next_cookie = NULL; int i; struct userdata user; @@ -299,55 +296,6 @@ int test(char *URL) printf( "PERFORM\n" ); curl_easy_perform( curl ); - printf( "CLEANUP\n" ); - curl_easy_cleanup( curl ); - curl_free(url); - curl_slist_free_all( headers ); - - /* load cookies */ - if ((curl = curl_easy_init()) == NULL) { - fprintf(stderr, "curl_easy_init() failed\n"); - curl_share_cleanup(share); - curl_global_cleanup(); - return TEST_ERR_MAJOR_BAD; - } - url = suburl( URL, i ); - headers = sethost( NULL ); - test_setopt( curl, CURLOPT_HTTPHEADER, headers ); - test_setopt( curl, CURLOPT_URL, url ); - printf( "CURLOPT_SHARE\n" ); - test_setopt( curl, CURLOPT_SHARE, share ); - printf( "CURLOPT_COOKIELIST ALL\n" ); - test_setopt( curl, CURLOPT_COOKIELIST, "ALL" ); - printf( "CURLOPT_COOKIEJAR\n" ); - test_setopt( curl, CURLOPT_COOKIEFILE, JAR ); - printf( "CURLOPT_COOKIELIST RELOAD\n" ); - test_setopt( curl, CURLOPT_COOKIELIST, "RELOAD" ); - - code = curl_easy_getinfo(curl, CURLINFO_COOKIELIST, &cookies); - if ( code != CURLE_OK ) - { - fprintf(stderr, "curl_easy_getinfo() failed\n"); - res = TEST_ERR_MAJOR_BAD; - goto test_cleanup; - } - printf("loaded cookies:\n"); - if ( !cookies ) - { - fprintf(stderr, " reloading cookies from '%s' failed\n", JAR); - res = TEST_ERR_MAJOR_BAD; - goto test_cleanup; - } - printf("-----------------\n"); - next_cookie = cookies; - while ( next_cookie ) - { - printf( " %s\n", next_cookie->data ); - next_cookie = next_cookie->next; - } - printf("-----------------\n"); - curl_slist_free_all( cookies ); - /* try to free share, expect to fail because share is in use*/ printf( "try SHARE_CLEANUP...\n" ); scode = curl_share_cleanup( share ); @@ -364,8 +312,12 @@ test_cleanup: /* clean up last handle */ printf( "CLEANUP\n" ); curl_easy_cleanup( curl ); - curl_slist_free_all( headers ); - curl_free(url); + + if ( headers ) + curl_slist_free_all( headers ); + + if ( url ) + curl_free(url); /* free share */ printf( "SHARE_CLEANUP\n" ); diff --git a/tests/libtest/lib544.c b/tests/libtest/lib544.c index 7e2f735..b766187 100644 --- a/tests/libtest/lib544.c +++ b/tests/libtest/lib544.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2011, Daniel Stenberg, , 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,10 +30,7 @@ static char teststring[] = "\x72\x79\x20\x64\x61\x74\x61\x20\x77\x69\x74\x68\x20\x61\x6e\x20\x65\x6d" "\x62\x65\x64\x64\x65\x64\x20\x4e\x55\x4c\x20\x62\x79\x74\x65\x0a"; #else -{ 'T', 'h', 'i', 's', '\0', ' ', 'i', 's', ' ', 't', 'e', 's', 't', ' ', - 'b', 'i', 'n', 'a', 'r', 'y', ' ', 'd', 'a', 't', 'a', ' ', - 'w', 'i', 't', 'h', ' ', 'a', 'n', ' ', - 'e', 'm', 'b', 'e', 'd', 'd', 'e', 'd', ' ', 'N', 'U', 'L'}; + "This\0 is test binary data with an embedded NUL byte\n"; #endif @@ -57,7 +54,7 @@ int test(char *URL) test_setopt(curl, CURLOPT_URL, URL); #ifdef LIB545 - test_setopt(curl, CURLOPT_POSTFIELDSIZE, (long) sizeof teststring); + test_setopt(curl, CURLOPT_POSTFIELDSIZE, (long) sizeof teststring - 1); #endif test_setopt(curl, CURLOPT_COPYPOSTFIELDS, teststring); @@ -68,16 +65,6 @@ int test(char *URL) /* Update the original data to detect non-copy. */ strcpy(teststring, "FAIL"); -#ifdef LIB545 - { - CURL *handle2; - handle2 = curl_easy_duphandle(curl); - curl_easy_cleanup(curl); - - curl = handle2; - } -#endif - /* Now, this is a POST request with binary 0 embedded in POST data. */ res = curl_easy_perform(curl); diff --git a/tests/libtest/lib556.c b/tests/libtest/lib556.c index a4b4b93..9806220 100644 --- a/tests/libtest/lib556.c +++ b/tests/libtest/lib556.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2011, Daniel Stenberg, , 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,6 @@ ***************************************************************************/ #include "test.h" -#include "warnless.h" #include "memdebug.h" /* For Windows, mainly (may be moved in a config file?) */ diff --git a/tests/libtest/lib599.c b/tests/libtest/lib599.c index 08c536c..6b09267 100644 --- a/tests/libtest/lib599.c +++ b/tests/libtest/lib599.c @@ -43,7 +43,6 @@ int test(char *URL) { CURL *curl; CURLcode res=CURLE_OK; - double content_length = 0.0; if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { fprintf(stderr, "curl_global_init() failed\n"); @@ -75,17 +74,6 @@ int test(char *URL) /* Perform the request, res will get the return code */ res = curl_easy_perform(curl); - if (!res) { - FILE *moo; - res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, - &content_length); - moo = fopen(libtest_arg2, "wb"); - if (moo) { - fprintf(moo, "CL: %.0f\n", content_length); - fclose(moo); - } - } - test_cleanup: /* always cleanup */ diff --git a/tests/libtest/sethostname.h b/tests/libtest/sethostname.h index 032eaa0..192f037 100644 --- a/tests/libtest/sethostname.h +++ b/tests/libtest/sethostname.h @@ -23,8 +23,12 @@ #ifdef CURL_STATICLIB # define LIBHOSTNAME_EXTERN #elif defined(WIN32) || defined(__SYMBIAN32__) -# define LIBHOSTNAME_EXTERN __declspec(dllexport) -#elif defined(CURL_HIDDEN_SYMBOLS) +# if defined(BUILDING_LIBCURL) +# define LIBHOSTNAME_EXTERN __declspec(dllexport) +# else +# define LIBHOSTNAME_EXTERN __declspec(dllimport) +# endif +#elif defined(BUILDING_LIBCURL) && defined(CURL_HIDDEN_SYMBOLS) # define LIBHOSTNAME_EXTERN CURL_EXTERN_SYMBOL #else # define LIBHOSTNAME_EXTERN diff --git a/tests/libtest/test1013.pl b/tests/libtest/test1013.pl index b680273..37f98d7 100755 --- a/tests/libtest/test1013.pl +++ b/tests/libtest/test1013.pl @@ -23,7 +23,7 @@ $curl_protocols =~ /\w+: (.*)$/; @curl = split / /,$1; # These features are not supported by curl-config -@curl = grep(!/^(Debug|TrackMemory|Metalink|Largefile|CharConv)$/i, @curl); +@curl = grep(!/^(Debug|TrackMemory|Metalink|Largefile|CharConv|GSS-Negotiate|SPNEGO)$/i, @curl); @curl = sort @curl; # Read the output of curl-config @@ -33,7 +33,9 @@ while( ) { chomp; # ignore curl-config --features not in curl's feature list - push @curl_config, lc($_); + if(!/^(GSS-API)$/) { + push @curl_config, lc($_); + } } close CURLCONFIG; diff --git a/tests/runtests.pl b/tests/runtests.pl index 846687c..da71414 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -141,7 +141,6 @@ my $HTTPTLSPORT; # HTTP TLS (non-stunnel) server port my $HTTPTLS6PORT; # HTTP TLS (non-stunnel) IPv6 server port my $HTTPPROXYPORT; # HTTP proxy port, when using CONNECT my $HTTPPIPEPORT; # HTTP pipelining port -my $HTTPUNIXPATH; # HTTP server Unix domain socket path my $srcdir = $ENV{'srcdir'} || '.'; my $CURL="../src/curl".exe_ext(); # what curl executable to run on the tests @@ -199,53 +198,42 @@ my $valgrind_tool; my $gdb = checktestcmd("gdb"); my $httptlssrv = find_httptlssrv(); -my $ssl_version; # set if libcurl is built with SSL support -my $large_file; # set if libcurl is built with large file support -my $has_idn; # set if libcurl is built with IDN support -my $http_ipv6; # set if HTTP server has IPv6 support -my $http_unix; # set if HTTP server has Unix sockets support -my $ftp_ipv6; # set if FTP server has IPv6 support -my $tftp_ipv6; # set if TFTP server has IPv6 support -my $gopher_ipv6; # set if Gopher server has IPv6 support -my $has_ipv6; # set if libcurl is built with IPv6 support -my $has_unix; # set if libcurl is built with Unix sockets support -my $has_libz; # set if libcurl is built with libz support +my $ssl_version; # set if libcurl is built with SSL support +my $large_file; # set if libcurl is built with large file support +my $has_idn; # set if libcurl is built with IDN support +my $http_ipv6; # set if HTTP server has IPv6 support +my $ftp_ipv6; # set if FTP server has IPv6 support +my $tftp_ipv6; # set if TFTP server has IPv6 support +my $gopher_ipv6; # set if Gopher server has IPv6 support +my $has_ipv6; # set if libcurl is built with IPv6 support +my $has_libz; # set if libcurl is built with libz support my $has_getrlimit; # set if system has getrlimit() -my $has_ntlm; # set if libcurl is built with NTLM support -my $has_ntlm_wb; # set if libcurl is built with NTLM delegation to winbind -my $has_sspi; # set if libcurl is built with Windows SSPI -my $has_gssapi; # set if libcurl is built with a GSS-API library -my $has_kerberos; # set if libcurl is built with Kerberos support -my $has_spnego; # set if libcurl is built with SPNEGO support -my $has_charconv; # set if libcurl is built with CharConv support -my $has_tls_srp; # set if libcurl is built with TLS-SRP support -my $has_metalink; # set if curl is built with Metalink support -my $has_http2; # set if libcurl is built with HTTP2 support -my $has_crypto; # set if libcurl is built with cryptographic support -my $has_cares; # set if built with c-ares -my $has_threadedres;# set if built with threaded resolver - -# this version is decided by the particular nghttp2 library that is being used -my $h2cver = "h2c-14"; - -my $has_openssl; # built with a lib using an OpenSSL-like API -my $has_gnutls; # built with GnuTLS -my $has_nss; # built with NSS -my $has_yassl; # built with yassl -my $has_polarssl; # built with polarssl -my $has_axtls; # built with axTLS -my $has_winssl; # built with WinSSL (Secure Channel aka Schannel) -my $has_darwinssl; # build with DarwinSSL (Secure Transport) - -my $has_sslpinning; # built with a TLS backend that supports pinning +my $has_ntlm; # set if libcurl is built with NTLM support +my $has_ntlm_wb; # set if libcurl is built with NTLM delegation to winbind +my $has_sspi; # set if libcurl is built with SSPI support +my $has_charconv;# set if libcurl is built with CharConv support +my $has_tls_srp; # set if libcurl is built with TLS-SRP support +my $has_metalink;# set if curl is built with Metalink support + +my $has_openssl; # built with a lib using an OpenSSL-like API +my $has_gnutls; # built with GnuTLS +my $has_nss; # built with NSS +my $has_yassl; # built with yassl +my $has_polarssl; # built with polarssl +my $has_axtls; # built with axTLS +my $has_winssl; # built with WinSSL (Secure Channel aka Schannel) +my $has_darwinssl;# build with DarwinSSL (Secure Transport) my $has_shared = "unknown"; # built shared -my $resolver; # name of the resolver backend (for human presentation) -my $ssllib; # name of the SSL library we use (for human presentation) +my $resolver; # string to hold the resolver backend +my $has_cares; # if built with c-ares +my $has_threadedres; # if built with threaded resolver -my $has_textaware; # set if running on a system that has a text mode concept - # on files. Windows for example +my $ssllib; # name of the lib we use (for human presentation) +my $has_crypto; # set if libcurl is built with cryptographic support +my $has_textaware; # set if running on a system that has a text mode concept + # on files. Windows for example my @protocols; # array of lowercase supported protocol servers @@ -317,7 +305,7 @@ my $USER = $ENV{USER}; # Linux if (!$USER) { $USER = $ENV{USERNAME}; # Windows if (!$USER) { - $USER = $ENV{LOGNAME}; # Some Unix (I think) + $USER = $ENV{LOGNAME}; # Some UNIX (I think) } } @@ -360,7 +348,7 @@ delete $ENV{'CURL_CA_BUNDLE'} if($ENV{'CURL_CA_BUNDLE'}); # Load serverpidfile hash with pidfile names for all possible servers. # sub init_serverpidfile_hash { - for my $proto (('ftp', 'http', 'imap', 'pop3', 'smtp')) { + for my $proto (('ftp', 'http', 'imap', 'pop3', 'smtp', 'http')) { for my $ssl (('', 's')) { for my $ipvnum ((4, 6)) { for my $idnum ((1, 2, 3)) { @@ -380,13 +368,6 @@ sub init_serverpidfile_hash { } } } - for my $proto (('http', 'imap', 'pop3', 'smtp')) { - for my $ssl (('', 's')) { - my $serv = servername_id("$proto$ssl", "unix", 1); - my $pidf = server_pidfilename("$proto$ssl", "unix", 1); - $serverpidfile{$serv} = $pidf; - } - } } ####################################################################### @@ -672,11 +653,11 @@ sub stopserver { # All servers relative to the given one must be stopped also # my @killservers; - if($server =~ /^(ftp|http|imap|pop3|smtp|httppipe)s((\d*)(-ipv6|-unix|))$/) { + if($server =~ /^(ftp|http|imap|pop3|smtp|httppipe)s((\d*)(-ipv6|))$/) { # given a stunnel based ssl server, also kill non-ssl underlying one push @killservers, "${1}${2}"; } - elsif($server =~ /^(ftp|http|imap|pop3|smtp|httppipe)((\d*)(-ipv6|-unix|))$/) { + elsif($server =~ /^(ftp|http|imap|pop3|smtp|httppipe)((\d*)(-ipv6|))$/) { # given a non-ssl server, also kill stunnel based ssl piggybacking one push @killservers, "${1}s${2}"; } @@ -722,12 +703,10 @@ sub stopserver { # assign requested address") # sub verifyhttp { - my ($proto, $ipvnum, $idnum, $ip, $port_or_path) = @_; + my ($proto, $ipvnum, $idnum, $ip, $port) = @_; my $server = servername_id($proto, $ipvnum, $idnum); my $pid = 0; my $bonus=""; - # $port_or_path contains a path for Unix sockets, sws ignores the port - my $port = ($ipvnum eq "unix") ? 80 : $port_or_path; my $verifyout = "$LOGDIR/". servername_canon($proto, $ipvnum, $idnum) .'_verify.out'; @@ -747,7 +726,6 @@ sub verifyhttp { $flags .= "--silent "; $flags .= "--verbose "; $flags .= "--globoff "; - $flags .= "--unix-socket '$port_or_path' " if $ipvnum eq "unix"; $flags .= "-1 " if($has_axtls); $flags .= "--insecure " if($proto eq 'https'); $flags .= "\"$proto://$ip:$port/${bonus}verifiedserver\""; @@ -984,7 +962,7 @@ sub verifysftp { } # Connect to sftp server, authenticate and run a remote pwd # command using our generated configuration and key files - my $cmd = "\"$sftp\" -b $sftpcmds -F $sftpconfig -S \"$ssh\" $ip > $sftplog 2>&1"; + my $cmd = "$sftp -b $sftpcmds -F $sftpconfig -S $ssh $ip > $sftplog 2>&1"; my $res = runclient($cmd); # Search for pwd command response in log file if(open(SFTPLOGFILE, "<$sftplog")) { @@ -1187,7 +1165,7 @@ sub responsiveserver { # start the http server # sub runhttpserver { - my ($proto, $verbose, $alt, $port_or_path) = @_; + my ($proto, $verbose, $alt, $port) = @_; my $ip = $HOSTIP; my $ipvnum = 4; my $idnum = 1; @@ -1214,10 +1192,6 @@ sub runhttpserver { $exe = "python $srcdir/http_pipe.py"; $verbose_flag .= "1 "; } - elsif($alt eq "unix") { - # IP (protocol) is mutually exclusive with Unix sockets - $ipvnum = "unix"; - } $server = servername_id($proto, $ipvnum, $idnum); @@ -1243,12 +1217,7 @@ sub runhttpserver { $flags .= $verbose_flag if($debugprotocol); $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" "; $flags .= "--id $idnum " if($idnum > 1); - if($ipvnum eq "unix") { - $flags .= "--unix-socket '$port_or_path' "; - } else { - $flags .= "--ipv$ipvnum --port $port_or_path "; - } - $flags .= "--srcdir \"$srcdir\""; + $flags .= "--ipv$ipvnum --port $port --srcdir \"$srcdir\""; my $cmd = "$exe $flags"; my ($httppid, $pid2) = startnew($cmd, $pidfile, 15, 0); @@ -1263,7 +1232,7 @@ sub runhttpserver { } # Server is up. Verify that we can speak to it. - my $pid3 = verifyserver($proto, $ipvnum, $idnum, $ip, $port_or_path); + my $pid3 = verifyserver($proto, $ipvnum, $idnum, $ip, $port); if(!$pid3) { logmsg "RUN: $srvrname server failed verification\n"; # failed to talk to it properly. Kill the server and return failure @@ -2066,7 +2035,7 @@ sub runsocksserver { $sshlog = server_logfilename($LOGDIR, 'socks', $ipvnum, $idnum); # start our socks server - my $cmd="\"$ssh\" -N -F $sshconfig $ip > $sshlog 2>&1"; + my $cmd="$ssh -N -F $sshconfig $ip > $sshlog 2>&1"; my ($sshpid, $pid2) = startnew($cmd, $pidfile, 30, 1); # fake pidfile if($sshpid <= 0 || !pidexists($sshpid)) { @@ -2104,7 +2073,7 @@ sub runsocksserver { # be used to verify that a server present in %run hash is still functional # sub responsive_http_server { - my ($proto, $verbose, $alt, $port_or_path) = @_; + my ($proto, $verbose, $alt, $port) = @_; my $ip = $HOSTIP; my $ipvnum = 4; my $idnum = 1; @@ -2117,12 +2086,8 @@ sub responsive_http_server { elsif($alt eq "proxy") { $idnum = 2; } - elsif($alt eq "unix") { - # IP (protocol) is mutually exclusive with Unix sockets - $ipvnum = "unix"; - } - return &responsiveserver($proto, $ipvnum, $idnum, $ip, $port_or_path); + return &responsiveserver($proto, $ipvnum, $idnum, $ip, $port); } ####################################################################### @@ -2243,10 +2208,37 @@ sub cleardir { } ####################################################################### +# filter out the specified pattern from the given input file and store the +# results in the given output file +# +sub filteroff { + my $infile=$_[0]; + my $filter=$_[1]; + my $ofile=$_[2]; + + open(IN, "<$infile") + || return 1; + + open(OUT, ">$ofile") + || return 1; + + # logmsg "FILTER: off $filter from $infile to $ofile\n"; + + while() { + $_ =~ s/$filter//; + print OUT $_; + } + close(IN); + close(OUT); + return 0; +} + +####################################################################### # compare test results with the expected output, we might filter off # some pattern that is allowed to differ, output test results # sub compare { + # filter off patterns _before_ this comparison! my ($testnum, $testname, $subject, $firstref, $secondref)=@_; my $result = compareparts($firstref, $secondref); @@ -2334,12 +2326,10 @@ sub checksystem { } elsif ($libcurl =~ /openssl/i) { $has_openssl=1; - $has_sslpinning=1; $ssllib="OpenSSL"; } elsif ($libcurl =~ /gnutls/i) { $has_gnutls=1; - $has_sslpinning=1; $ssllib="GnuTLS"; } elsif ($libcurl =~ /nss/i) { @@ -2372,10 +2362,9 @@ sub checksystem { @protocols = split(' ', lc($1)); # Generate a "proto-ipv6" version of each protocol to match the - # IPv6 name and a "proto-unix" to match the variant which - # uses Unix domain sockets. This works even if support isn't + # IPv6 name. This works even if IPv6 support isn't # compiled in because the test will fail. - push @protocols, map(("$_-ipv6", "$_-unix"), @protocols); + push @protocols, map($_ . '-ipv6', @protocols); # 'http-proxy' is used in test cases to do CONNECT through push @protocols, 'http-proxy'; @@ -2411,17 +2400,13 @@ sub checksystem { if($feat =~ /IPv6/i) { $has_ipv6 = 1; } - if($feat =~ /UnixSockets/i) { - $has_unix = 1; - } if($feat =~ /libz/i) { $has_libz = 1; } if($feat =~ /NTLM/i) { # NTLM enabled $has_ntlm=1; - - # Use this as a proxy for any cryptographic authentication + # Use this as a proxy for any cryptographic authentication $has_crypto=1; } if($feat =~ /NTLM_WB/i) { @@ -2432,24 +2417,6 @@ sub checksystem { # SSPI enabled $has_sspi=1; } - if($feat =~ /GSS-API/i) { - # GSS-API enabled - $has_gssapi=1; - } - if($feat =~ /Kerberos/i) { - # Kerberos enabled - $has_kerberos=1; - - # Use this as a proxy for any cryptographic authentication - $has_crypto=1; - } - if($feat =~ /SPNEGO/i) { - # SPNEGO enabled - $has_spnego=1; - - # Use this as a proxy for any cryptographic authentication - $has_crypto=1; - } if($feat =~ /CharConv/i) { # CharConv enabled $has_charconv=1; @@ -2469,10 +2436,6 @@ sub checksystem { $resolver="threaded"; } } - if($feat =~ /HTTP2/) { - # http2 enabled - $has_http2=1; - } } # # Test harness currently uses a non-stunnel server in order to @@ -2529,12 +2492,12 @@ sub checksystem { } if($has_ipv6) { - # client has IPv6 support + # client has ipv6 support # check if the HTTP server has it! my @sws = `server/sws --version`; if($sws[0] =~ /IPv6/) { - # HTTP server has IPv6 support! + # HTTP server has ipv6 support! $http_ipv6 = 1; $gopher_ipv6 = 1; } @@ -2542,17 +2505,11 @@ sub checksystem { # check if the FTP server has it! @sws = `server/sockfilt --version`; if($sws[0] =~ /IPv6/) { - # FTP server has IPv6 support! + # FTP server has ipv6 support! $ftp_ipv6 = 1; } } - if($has_unix) { - # client has Unix sockets support, check whether the HTTP server has it - my @sws = `server/sws --version`; - $http_unix = 1 if($sws[0] =~ /unix/); - } - if(!$has_memory_tracking && $torture) { die "can't run torture tests since curl was built without ". "TrackMemory feature (--enable-curldebug)"; @@ -2584,7 +2541,6 @@ sub checksystem { logmsg sprintf(" track memory: %s\n", $has_memory_tracking?"ON ":"OFF"); logmsg sprintf("* valgrind: %8s", $valgrind?"ON ":"OFF"); logmsg sprintf(" HTTP IPv6 %s\n", $http_ipv6?"ON ":"OFF"); - logmsg sprintf("* HTTP Unix %s\n", $http_unix?"ON ":"OFF"); logmsg sprintf("* FTP IPv6 %8s", $ftp_ipv6?"ON ":"OFF"); logmsg sprintf(" Libtool lib: %s\n", $libtool?"ON ":"OFF"); logmsg sprintf("* Shared build: %-3s", $has_shared); @@ -2637,13 +2593,6 @@ sub checksystem { } logmsg sprintf("* HTTP-PIPE/%d \n", $HTTPPIPEPORT); - if($has_unix) { - logmsg "* Unix socket paths:\n"; - if($http_unix) { - logmsg sprintf("* HTTP-Unix:%s\n", $HTTPUNIXPATH); - } - } - $has_textaware = ($^O eq 'MSWin32') || ($^O eq 'msys'); logmsg "***************************************** \n"; @@ -2692,10 +2641,6 @@ sub subVariables { $$thing =~ s/%TFTP6PORT/$TFTP6PORT/g; $$thing =~ s/%TFTPPORT/$TFTPPORT/g; - # server Unix domain socket paths - - $$thing =~ s/%HTTPUNIXPATH/$HTTPUNIXPATH/g; - # client IP addresses $$thing =~ s/%CLIENT6IP/$CLIENT6IP/g; @@ -2723,10 +2668,6 @@ sub subVariables { $$thing =~ s/%FTPTIME2/$ftp2/g; $$thing =~ s/%FTPTIME3/$ftp3/g; - - # HTTP2 - - $$thing =~ s/%H2CVER/$h2cver/g; } sub fixarray { @@ -2812,7 +2753,7 @@ sub singletest { $timeprepini{$testnum} = Time::HiRes::time() if($timestats); if($disttests !~ /test$testnum\W/ ) { - logmsg "Warning: test$testnum not present in tests/data/Makefile.inc\n"; + logmsg "Warning: test$testnum not present in tests/data/Makefile.am\n"; } if($disabled{$testnum}) { logmsg "Warning: test$testnum is explicitly disabled\n"; @@ -2844,11 +2785,6 @@ sub singletest { next; } } - elsif($1 eq "SSLpinning") { - if($has_sslpinning) { - next; - } - } elsif($1 eq "OpenSSL") { if($has_openssl) { next; @@ -2929,21 +2865,6 @@ sub singletest { next; } } - elsif($1 eq "GSS-API") { - if($has_gssapi) { - next; - } - } - elsif($1 eq "Kerberos") { - if($has_kerberos) { - next; - } - } - elsif($1 eq "SPNEGO") { - if($has_spnego) { - next; - } - } elsif($1 eq "getrlimit") { if($has_getrlimit) { next; @@ -2964,17 +2885,9 @@ sub singletest { next; } } - elsif($1 eq "http2") { - if($has_http2) { - next; - } - } elsif($1 eq "socks") { next; } - elsif($1 eq "unix-sockets") { - next if $has_unix; - } # See if this "feature" is in the list of supported protocols elsif (grep /^\Q$1\E$/i, @protocols) { next; @@ -3047,9 +2960,6 @@ sub singletest { next; } } - elsif($1 eq "unix-sockets") { - next if !$has_unix; - } elsif($1 eq "libz") { if(!$has_libz) { next; @@ -3070,21 +2980,6 @@ sub singletest { next; } } - elsif($1 eq "GSS-API") { - if(!$has_gssapi) { - next; - } - } - elsif($1 eq "Kerberos") { - if(!$has_kerberos) { - next; - } - } - elsif($1 eq "SPNEGO") { - if(!$has_spnego) { - next; - } - } elsif($1 eq "getrlimit") { if(!$has_getrlimit) { next; @@ -3245,14 +3140,14 @@ sub singletest { if(!$short) { if($skipped{$why} <= 3) { # show only the first three skips for each reason - logmsg sprintf("test %04d SKIPPED: $why\n", $testnum); + logmsg sprintf("test %03d SKIPPED: $why\n", $testnum); } } timestampskippedevents($testnum); return -1; } - logmsg sprintf("test %04d...", $testnum) if(!$automakestyle); + logmsg sprintf("test %03d...", $testnum) if(!$automakestyle); # extract the reply data my @reply = getpart("reply", "data"); @@ -3621,11 +3516,11 @@ sub singletest { my @killservers; foreach my $server (@killtestservers) { chomp $server; - if($server =~ /^(ftp|http|imap|pop3|smtp)s((\d*)(-ipv6|-unix|))$/) { + if($server =~ /^(ftp|http|imap|pop3|smtp)s((\d*)(-ipv6|))$/) { # given a stunnel ssl server, also kill non-ssl underlying one push @killservers, "${1}${2}"; } - elsif($server =~ /^(ftp|http|imap|pop3|smtp)((\d*)(-ipv6|-unix|))$/) { + elsif($server =~ /^(ftp|http|imap|pop3|smtp)((\d*)(-ipv6|))$/) { # given a non-ssl server, also kill stunnel piggybacking one push @killservers, "${1}s${2}"; } @@ -4139,7 +4034,7 @@ sub startservers { $what =~ s/[^a-z0-9-]//g; my $certfile; - if($what =~ /^(ftp|http|imap|pop3|smtp)s((\d*)(-ipv6|-unix|))$/) { + if($what =~ /^(ftp|http|imap|pop3|smtp)s((\d*)(-ipv6|))$/) { $certfile = ($whatlist[1]) ? $whatlist[1] : 'stunnel.pem'; } @@ -4257,7 +4152,7 @@ sub startservers { } elsif($what eq "http-ipv6") { if($torture && $run{'http-ipv6'} && - !responsive_http_server("http", $verbose, "ipv6", $HTTP6PORT)) { + !responsive_http_server("http", $verbose, "IPv6", $HTTP6PORT)) { stopserver('http-ipv6'); } if(!$run{'http-ipv6'}) { @@ -4304,11 +4199,11 @@ sub startservers { } elsif($what eq "rtsp-ipv6") { if($torture && $run{'rtsp-ipv6'} && - !responsive_rtsp_server($verbose, "ipv6")) { + !responsive_rtsp_server($verbose, "IPv6")) { stopserver('rtsp-ipv6'); } if(!$run{'rtsp-ipv6'}) { - ($pid, $pid2) = runrtspserver($verbose, "ipv6"); + ($pid, $pid2) = runrtspserver($verbose, "IPv6"); if($pid <= 0) { return "failed starting RTSP-IPv6 server"; } @@ -4416,11 +4311,11 @@ sub startservers { return "no gnutls-serv"; } if($torture && $run{'httptls-ipv6'} && - !responsive_httptls_server($verbose, "ipv6")) { + !responsive_httptls_server($verbose, "IPv6")) { stopserver('httptls-ipv6'); } if(!$run{'httptls-ipv6'}) { - ($pid, $pid2) = runhttptlsserver($verbose, "ipv6"); + ($pid, $pid2) = runhttptlsserver($verbose, "IPv6"); if($pid <= 0) { return "failed starting HTTPTLS-IPv6 server (gnutls-serv)"; } @@ -4445,11 +4340,11 @@ sub startservers { } elsif($what eq "tftp-ipv6") { if($torture && $run{'tftp-ipv6'} && - !responsive_tftp_server("", $verbose, "ipv6")) { + !responsive_tftp_server("", $verbose, "IPv6")) { stopserver('tftp-ipv6'); } if(!$run{'tftp-ipv6'}) { - ($pid, $pid2) = runtftpserver("", $verbose, "ipv6"); + ($pid, $pid2) = runtftpserver("", $verbose, "IPv6"); if($pid <= 0) { return "failed starting TFTP-IPv6 server"; } @@ -4494,22 +4389,6 @@ sub startservers { } } } - elsif($what eq "http-unix") { - if($torture && $run{'http-unix'} && - !responsive_http_server("http", $verbose, "unix", $HTTPUNIXPATH)) { - stopserver('http-unix'); - } - if(!$run{'http-unix'}) { - ($pid, $pid2) = runhttpserver("http", $verbose, "unix", - $HTTPUNIXPATH); - if($pid <= 0) { - return "failed starting HTTP-unix server"; - } - logmsg sprintf("* pid http-unix => %d %d\n", $pid, $pid2) - if($verbose); - $run{'http-unix'}="$pid $pid2"; - } - } elsif($what eq "none") { logmsg "* starts no server\n" if ($verbose); } @@ -4933,7 +4812,7 @@ if ($gdbthis) { if($c eq "#! /") { # A shell script. This is typically when built with libtool, $libtool = 1; - $gdb = "../libtool --mode=execute gdb"; + $gdb = "libtool --mode=execute gdb"; } } @@ -4962,7 +4841,6 @@ $HTTPTLSPORT = $base++; # HTTP TLS (non-stunnel) server port $HTTPTLS6PORT = $base++; # HTTP TLS (non-stunnel) IPv6 server port $HTTPPROXYPORT = $base++; # HTTP proxy port, when using CONNECT $HTTPPIPEPORT = $base++; # HTTP pipelining port -$HTTPUNIXPATH = 'http.sock'; # HTTP server Unix domain socket path ####################################################################### # clear and create logging directory: @@ -4987,21 +4865,20 @@ if(!$listonly) { } ####################################################################### -# Fetch all disabled tests, if there are any +# Fetch all disabled tests # -if(open(D, "<$TESTDIR/DISABLED")) { - while() { - if(/^ *\#/) { - # allow comments - next; - } - if($_ =~ /(\d+)/) { - $disabled{$1}=$1; # disable this test number - } +open(D, "<$TESTDIR/DISABLED"); +while() { + if(/^ *\#/) { + # allow comments + next; + } + if($_ =~ /(\d+)/) { + $disabled{$1}=$1; # disable this test number } - close(D); } +close(D); ####################################################################### # If 'all' tests are requested, find out all test numbers diff --git a/tests/secureserver.pl b/tests/secureserver.pl index 6276110..4b7a23b 100755 --- a/tests/secureserver.pl +++ b/tests/secureserver.pl @@ -33,7 +33,6 @@ BEGIN { use strict; use warnings; use Cwd; -use Cwd 'abs_path'; use serverhelp qw( server_pidfilename @@ -53,7 +52,6 @@ my $ver_major; my $ver_minor; my $fips_support; my $stunnel_version; -my $tstunnel_windows; my $socketopt; my $cmd; @@ -64,7 +62,6 @@ my $ipvnum = 4; # default IP version of stunneled server my $idnum = 1; # dafault stunneled server instance number my $proto = 'https'; # default secure server protocol my $conffile; # stunnel configuration file -my $capath; # certificate chain PEM folder my $certfile; # certificate chain PEM file #*************************************************************************** @@ -181,9 +178,7 @@ if(!$logfile) { $conffile = "$path/stunnel.conf"; -$capath = abs_path($path); $certfile = "$srcdir/". ($stuncert?"certs/$stuncert":"stunnel.pem"); -$certfile = abs_path($certfile); my $ssltext = uc($proto) ." SSL/TLS:"; @@ -224,17 +219,6 @@ if($stunnel_version < 310) { } #*************************************************************************** -# Find out if we are running on Windows using the tstunnel binary -# -if($stunnel =~ /tstunnel(\.exe)?"?$/) { - $tstunnel_windows = 1; - - # replace Cygwin and MinGW drives within paths - $capath =~ s/^(\/cygdrive)?\/(\w)\//$2\:\//; - $certfile =~ s/^(\/cygdrive)?\/(\w)\//$2\:\//; -} - -#*************************************************************************** # Build command to execute for stunnel 3.X versions # if($stunnel_version < 400) { @@ -269,24 +253,26 @@ if($stunnel_version >= 400) { $SIG{TERM} = \&exit_signal_handler; # stunnel configuration file if(open(STUNCONF, ">$conffile")) { - print STUNCONF "CApath = $capath\n"; - print STUNCONF "cert = $certfile\n"; - print STUNCONF "debug = $loglevel\n"; - print STUNCONF "socket = $socketopt\n"; + print STUNCONF " + CApath = $path + cert = $certfile + debug = $loglevel + socket = $socketopt"; if($fips_support) { # disable fips in case OpenSSL doesn't support it - print STUNCONF "fips = no\n"; + print STUNCONF " + fips = no"; } - if(!$tstunnel_windows) { - # do not use Linux-specific options on Windows - print STUNCONF "output = $logfile\n"; - print STUNCONF "pid = $pidfile\n"; - print STUNCONF "foreground = yes\n"; + if($stunnel !~ /tstunnel(\.exe)?"?$/) { + print STUNCONF " + output = $logfile + pid = $pidfile + foreground = yes"; } - print STUNCONF "\n"; - print STUNCONF "[curltest]\n"; - print STUNCONF "accept = $accept_port\n"; - print STUNCONF "connect = $target_port\n"; + print STUNCONF " + [curltest] + accept = $accept_port + connect = $target_port"; if(!close(STUNCONF)) { print "$ssltext Error closing file $conffile\n"; exit 1; @@ -299,18 +285,13 @@ if($stunnel_version >= 400) { if($verbose) { print uc($proto) ." server (stunnel $ver_major.$ver_minor)\n"; print "cmd: $cmd\n"; - print "CApath = $capath\n"; + print "CApath = $path\n"; print "cert = $certfile\n"; + print "pid = $pidfile\n"; print "debug = $loglevel\n"; print "socket = $socketopt\n"; - if($fips_support) { - print "fips = no\n"; - } - if(!$tstunnel_windows) { - print "pid = $pidfile\n"; - print "output = $logfile\n"; - print "foreground = yes\n"; - } + print "output = $logfile\n"; + print "foreground = yes\n"; print "\n"; print "[curltest]\n"; print "accept = $accept_port\n"; @@ -326,7 +307,7 @@ chmod(0600, $certfile) if(-f $certfile); #*************************************************************************** # Run tstunnel on Windows. # -if($tstunnel_windows) { +if($stunnel =~ /tstunnel(\.exe)?"?$/) { # Fake pidfile for tstunnel on Windows. if(open(OUT, ">$pidfile")) { print OUT $$ . "\n"; diff --git a/tests/server/CMakeLists.txt b/tests/server/CMakeLists.txt index 00f5242..ee08345 100644 --- a/tests/server/CMakeLists.txt +++ b/tests/server/CMakeLists.txt @@ -9,11 +9,11 @@ function(SETUP_EXECUTABLE TEST_NAME) # ARGN are the files in the test ${CURL_BINARY_DIR}/lib # To be able to reach "curl_config.h" ${CURL_BINARY_DIR}/include # To be able to reach "curl/curlbuild.h" ) - if(USE_ARES) + if(CURL_USE_ARES) include_directories(${CARES_INCLUDE_DIR}) endif() - - target_link_libraries(${TEST_NAME} ${CURL_LIBS}) + # resolve test needs this + setup_curl_dependencies(${TEST_NAME}) # Test servers simply are standalone programs that do not use libcurl # library. For convinience and to ease portability of these servers, diff --git a/tests/server/resolve.c b/tests/server/resolve.c index 39849e7..d060988 100644 --- a/tests/server/resolve.c +++ b/tests/server/resolve.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * 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 @@ -120,7 +120,7 @@ int main(int argc, char *argv[]) /* Check that the system has IPv6 enabled before checking the resolver */ curl_socket_t s = socket(PF_INET6, SOCK_DGRAM, 0); if(s == CURL_SOCKET_BAD) - /* an IPv6 address was requested and we can't get/use one */ + /* an ipv6 address was requested and we can't get/use one */ rc = -1; else { sclose(s); @@ -135,11 +135,9 @@ int main(int argc, char *argv[]) hints.ai_family = PF_INET6; hints.ai_socktype = SOCK_STREAM; hints.ai_flags = AI_CANONNAME; - /* Use parenthesis around functions to stop them from being replaced by - the macro in memdebug.h */ + /* Use parenthesis around function to stop it from being replaced by + the macro in memdebug.h */ rc = (getaddrinfo)(host, "80", &hints, &ai); - if (rc == 0) - (freeaddrinfo)(ai); } #else diff --git a/tests/server/server_sockaddr.h b/tests/server/server_sockaddr.h index 3f4cd67..6a17fe0 100644 --- a/tests/server/server_sockaddr.h +++ b/tests/server/server_sockaddr.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * 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 @@ -23,19 +23,12 @@ ***************************************************************************/ #include "server_setup.h" -#ifdef HAVE_SYS_UN_H -#include /* for sockaddr_un */ -#endif - typedef union { struct sockaddr sa; struct sockaddr_in sa4; #ifdef ENABLE_IPV6 struct sockaddr_in6 sa6; #endif -#ifdef USE_UNIX_SOCKETS - struct sockaddr_un sau; -#endif } srvr_sockaddr_union_t; #endif /* HEADER_CURL_SERVER_SOCKADDR_H */ diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c index a4496e0..84b1be4 100644 --- a/tests/server/sockfilt.c +++ b/tests/server/sockfilt.c @@ -23,7 +23,7 @@ /* Purpose * - * 1. Accept a TCP connection on a custom port (IPv4 or IPv6), or connect + * 1. Accept a TCP connection on a custom port (ipv4 or ipv6), or connect * to a given (localhost) port. * * 2. Get commands on STDIN. Pass data on to the TCP stream. @@ -285,10 +285,10 @@ static ssize_t read_wincon(int fd, void *buf, size_t count) } if(GetConsoleMode(handle, &mode)) { - success = ReadConsole(handle, buf, curlx_uztoul(count), &rcount, NULL); + success = ReadConsole(handle, buf, count, &rcount, NULL); } else { - success = ReadFile(handle, buf, curlx_uztoul(count), &rcount, NULL); + success = ReadFile(handle, buf, count, &rcount, NULL); } if(success) { return rcount; @@ -320,10 +320,10 @@ static ssize_t write_wincon(int fd, const void *buf, size_t count) } if(GetConsoleMode(handle, &mode)) { - success = WriteConsole(handle, buf, curlx_uztoul(count), &wcount, NULL); + success = WriteConsole(handle, buf, count, &wcount, NULL); } else { - success = WriteFile(handle, buf, curlx_uztoul(count), &wcount, NULL); + success = WriteFile(handle, buf, count, &wcount, NULL); } if(success) { return wcount; @@ -550,21 +550,15 @@ static DWORD WINAPI select_ws_wait_thread(LPVOID lpParameter) while(WaitForMultipleObjectsEx(2, handles, FALSE, INFINITE, FALSE) == WAIT_OBJECT_0 + 1) { /* get total size of file */ - length = 0; size.QuadPart = 0; - size.LowPart = GetFileSize(handle, &length); - if((size.LowPart != INVALID_FILE_SIZE) || - (GetLastError() == NO_ERROR)) { - size.HighPart = length; + if(GetFileSizeEx(handle, &size)) { /* get the current position within the file */ pos.QuadPart = 0; - pos.LowPart = SetFilePointer(handle, 0, &pos.HighPart, FILE_CURRENT); - if((pos.LowPart != INVALID_SET_FILE_POINTER) || - (GetLastError() == NO_ERROR)) { + if(SetFilePointerEx(handle, pos, &pos, FILE_CURRENT)) { /* compare position with size, abort if not equal */ if(size.QuadPart == pos.QuadPart) { /* sleep and continue waiting */ - SleepEx(0, FALSE); + SleepEx(100, FALSE); continue; } } @@ -585,7 +579,6 @@ static DWORD WINAPI select_ws_wait_thread(LPVOID lpParameter) while(WaitForMultipleObjectsEx(2, handles, FALSE, INFINITE, FALSE) == WAIT_OBJECT_0 + 1) { /* check if this is an actual console handle */ - length = 0; if(GetConsoleMode(handle, &length)) { /* retrieve an event from the console buffer */ length = 0; @@ -614,18 +607,17 @@ static DWORD WINAPI select_ws_wait_thread(LPVOID lpParameter) while(WaitForMultipleObjectsEx(2, handles, FALSE, INFINITE, FALSE) == WAIT_OBJECT_0 + 1) { /* peek into the pipe and retrieve the amount of data available */ - length = 0; if(PeekNamedPipe(handle, NULL, 0, NULL, &length, NULL)) { /* if there is no data available, sleep and continue waiting */ if(length == 0) { - SleepEx(0, FALSE); + SleepEx(100, FALSE); continue; } } else { /* if the pipe has been closed, sleep and continue waiting */ if(GetLastError() == ERROR_BROKEN_PIPE) { - SleepEx(0, FALSE); + SleepEx(100, FALSE); continue; } } @@ -666,22 +658,15 @@ static HANDLE select_ws_wait(HANDLE handle, HANDLE event) return thread; } -struct select_ws_data { - curl_socket_t fd; /* the original input handle (indexed by fds) */ - curl_socket_t wsasock; /* the internal socket handle (indexed by wsa) */ - WSAEVENT wsaevent; /* the internal WINSOCK2 event (indexed by wsa) */ - HANDLE thread; /* the internal threads handle (indexed by thd) */ -}; static int select_ws(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout) { DWORD milliseconds, wait, idx; + WSAEVENT wsaevent, *wsaevents; WSANETWORKEVENTS wsanetevents; - struct select_ws_data *data; - HANDLE handle, *handles; - curl_socket_t sock; + HANDLE handle, *handles, *threads; + curl_socket_t sock, *fdarr, *wsasocks; long networkevents; - WSAEVENT wsaevent; int error, fds; HANDLE waitevent = NULL; DWORD nfd = 0, thd = 0, wsa = 0; @@ -706,9 +691,9 @@ static int select_ws(int nfds, fd_set *readfds, fd_set *writefds, return -1; } - /* allocate internal array for the internal data */ - data = malloc(nfds * sizeof(struct select_ws_data)); - if(data == NULL) { + /* allocate internal array for the original input handles */ + fdarr = malloc(nfds * sizeof(curl_socket_t)); + if(fdarr == NULL) { errno = ENOMEM; return -1; } @@ -716,14 +701,40 @@ static int select_ws(int nfds, fd_set *readfds, fd_set *writefds, /* allocate internal array for the internal event handles */ handles = malloc(nfds * sizeof(HANDLE)); if(handles == NULL) { - free(data); + free(fdarr); errno = ENOMEM; return -1; } - /* clear internal arrays */ - memset(data, 0, nfds * sizeof(struct select_ws_data)); - memset(handles, 0, nfds * sizeof(HANDLE)); + /* allocate internal array for the internal threads handles */ + threads = malloc(nfds * sizeof(HANDLE)); + if(threads == NULL) { + free(handles); + free(fdarr); + errno = ENOMEM; + return -1; + } + + /* allocate internal array for the internal socket handles */ + wsasocks = malloc(nfds * sizeof(curl_socket_t)); + if(wsasocks == NULL) { + free(threads); + free(handles); + free(fdarr); + errno = ENOMEM; + return -1; + } + + /* allocate internal array for the internal WINSOCK2 events */ + wsaevents = malloc(nfds * sizeof(WSAEVENT)); + if(wsaevents == NULL) { + free(threads); + free(wsasocks); + free(handles); + free(fdarr); + errno = ENOMEM; + return -1; + } /* loop over the handles in the input descriptor sets */ for(fds = 0; fds < nfds; fds++) { @@ -741,12 +752,12 @@ static int select_ws(int nfds, fd_set *readfds, fd_set *writefds, /* only wait for events for which we actually care */ if(networkevents) { - data[nfd].fd = curlx_sitosk(fds); + fdarr[nfd] = curlx_sitosk(fds); if(fds == fileno(stdin)) { handle = GetStdHandle(STD_INPUT_HANDLE); handle = select_ws_wait(handle, waitevent); handles[nfd] = handle; - data[thd].thread = handle; + threads[thd] = handle; thd++; } else if(fds == fileno(stdout)) { @@ -762,8 +773,8 @@ static int select_ws(int nfds, fd_set *readfds, fd_set *writefds, if(error != SOCKET_ERROR) { handle = (HANDLE) wsaevent; handles[nfd] = handle; - data[wsa].wsasock = curlx_sitosk(fds); - data[wsa].wsaevent = wsaevent; + wsasocks[wsa] = curlx_sitosk(fds); + wsaevents[wsa] = wsaevent; wsa++; } else { @@ -771,7 +782,7 @@ static int select_ws(int nfds, fd_set *readfds, fd_set *writefds, handle = (HANDLE) curlx_sitosk(fds); handle = select_ws_wait(handle, waitevent); handles[nfd] = handle; - data[thd].thread = handle; + threads[thd] = handle; thd++; } } @@ -797,7 +808,7 @@ static int select_ws(int nfds, fd_set *readfds, fd_set *writefds, /* loop over the internal handles returned in the descriptors */ for(idx = 0; idx < nfd; idx++) { handle = handles[idx]; - sock = data[idx].fd; + sock = fdarr[idx]; fds = curlx_sktosi(sock); /* check if the current internal handle was triggered */ @@ -857,19 +868,22 @@ static int select_ws(int nfds, fd_set *readfds, fd_set *writefds, } for(idx = 0; idx < wsa; idx++) { - WSAEventSelect(data[idx].wsasock, NULL, 0); - WSACloseEvent(data[idx].wsaevent); + WSAEventSelect(wsasocks[idx], NULL, 0); + WSACloseEvent(wsaevents[idx]); } for(idx = 0; idx < thd; idx++) { - WaitForSingleObject(data[idx].thread, INFINITE); - CloseHandle(data[idx].thread); + WaitForSingleObject(threads[thd], INFINITE); + CloseHandle(threads[thd]); } CloseHandle(waitevent); + free(wsaevents); + free(wsasocks); + free(threads); free(handles); - free(data); + free(fdarr); return ret; } diff --git a/tests/server/sws.c b/tests/server/sws.c index 8cd30c5..38658cb 100644 --- a/tests/server/sws.c +++ b/tests/server/sws.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , 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,16 +65,11 @@ #define ERANGE 34 /* errno.h value */ #endif -static enum { - socket_domain_inet = AF_INET #ifdef ENABLE_IPV6 - , socket_domain_inet6 = AF_INET6 +static bool use_ipv6 = FALSE; #endif -#ifdef USE_UNIX_SOCKETS - , socket_domain_unix = AF_UNIX -#endif -} socket_domain = AF_INET; static bool use_gopher = FALSE; +static const char *ipv_inuse = "IPv4"; static int serverlogslocked = 0; static bool is_proxy = FALSE; @@ -119,8 +114,6 @@ struct httprequest { bool pipelining; /* true if request is pipelined */ int callcount; /* times ProcessRequest() gets called */ bool connmon; /* monitor the state of the connection, log disconnects */ - bool upgrade; /* test case allows upgrade to http2 */ - bool upgrade_request; /* upgrade request found and allowed */ int done_processing; }; @@ -171,9 +164,6 @@ const char *serverlogfile = DEFAULT_LOGFILE; proper point - like with NTLM */ #define CMD_CONNECTIONMONITOR "connection-monitor" -/* upgrade to http2 */ -#define CMD_UPGRADE "upgrade" - #define END_OF_HEADERS "\r\n\r\n" enum { @@ -329,21 +319,6 @@ static void restore_signal_handlers(void) #endif } -/* returns true if the current socket is an IP one */ -static bool socket_domain_is_ip(void) -{ - switch(socket_domain) { - case AF_INET: -#ifdef ENABLE_IPV6 - case AF_INET6: -#endif - return true; - default: - /* case AF_UNIX: */ - return false; - } -} - /* based on the testno, parse the correct server commands */ static int parse_servercmd(struct httprequest *req) { @@ -401,10 +376,6 @@ static int parse_servercmd(struct httprequest *req) logmsg("enabled connection monitoring"); req->connmon = TRUE; } - else if(!strncmp(CMD_UPGRADE, cmd, strlen(CMD_UPGRADE))) { - logmsg("enabled upgrade to http2"); - req->upgrade = TRUE; - } else if(1 == sscanf(cmd, "pipe: %d", &num)) { logmsg("instructed to allow a pipe size of %d", num); if(num < 0) @@ -818,12 +789,6 @@ static int ProcessRequest(struct httprequest *req) return 1; /* done */ } - if(req->upgrade && strstr(req->reqbuf, "Upgrade:")) { - /* we allow upgrade and there was one! */ - logmsg("Found Upgrade: in request and allows it"); - req->upgrade_request = TRUE; - } - if(req->cl > 0) { if(req->cl <= req->offset - (end - req->reqbuf) - strlen(end_of_headers)) return 1; /* done */ @@ -1301,12 +1266,15 @@ static curl_socket_t connect_to(const char *ipaddr, unsigned short port) srvr_sockaddr_union_t serveraddr; curl_socket_t serverfd; int error; - int rc = 0; + int rc; const char *op_br = ""; const char *cl_br = ""; +#ifdef TCP_NODELAY + curl_socklen_t flag; +#endif #ifdef ENABLE_IPV6 - if(socket_domain == AF_INET6) { + if(use_ipv6) { op_br = "["; cl_br = "]"; } @@ -1318,8 +1286,14 @@ static curl_socket_t connect_to(const char *ipaddr, unsigned short port) logmsg("about to connect to %s%s%s:%hu", op_br, ipaddr, cl_br, port); - - serverfd = socket(socket_domain, SOCK_STREAM, 0); +#ifdef ENABLE_IPV6 + if(!use_ipv6) +#endif + serverfd = socket(AF_INET, SOCK_STREAM, 0); +#ifdef ENABLE_IPV6 + else + serverfd = socket(AF_INET6, SOCK_STREAM, 0); +#endif if(CURL_SOCKET_BAD == serverfd) { error = SOCKERRNO; logmsg("Error creating socket for server conection: (%d) %s", @@ -1328,19 +1302,18 @@ static curl_socket_t connect_to(const char *ipaddr, unsigned short port) } #ifdef TCP_NODELAY - if(socket_domain_is_ip()) { - /* Disable the Nagle algorithm */ - curl_socklen_t flag = 1; - if(0 != setsockopt(serverfd, IPPROTO_TCP, TCP_NODELAY, - (void *)&flag, sizeof(flag))) - logmsg("====> TCP_NODELAY for server conection failed"); - else - logmsg("TCP_NODELAY set for server conection"); - } + /* Disable the Nagle algorithm */ + flag = 1; + if(0 != setsockopt(serverfd, IPPROTO_TCP, TCP_NODELAY, + (void *)&flag, sizeof(flag))) + logmsg("====> TCP_NODELAY for server conection failed"); + else + logmsg("TCP_NODELAY set for server conection"); #endif - switch(socket_domain) { - case AF_INET: +#ifdef ENABLE_IPV6 + if(!use_ipv6) { +#endif memset(&serveraddr.sa4, 0, sizeof(serveraddr.sa4)); serveraddr.sa4.sin_family = AF_INET; serveraddr.sa4.sin_port = htons(port); @@ -1351,9 +1324,9 @@ static curl_socket_t connect_to(const char *ipaddr, unsigned short port) } rc = connect(serverfd, &serveraddr.sa, sizeof(serveraddr.sa4)); - break; #ifdef ENABLE_IPV6 - case AF_INET6: + } + else { memset(&serveraddr.sa6, 0, sizeof(serveraddr.sa6)); serveraddr.sa6.sin6_family = AF_INET6; serveraddr.sa6.sin6_port = htons(port); @@ -1364,14 +1337,8 @@ static curl_socket_t connect_to(const char *ipaddr, unsigned short port) } rc = connect(serverfd, &serveraddr.sa, sizeof(serveraddr.sa6)); - break; -#endif /* ENABLE_IPV6 */ -#ifdef USE_UNIX_SOCKETS - case AF_UNIX: - logmsg("Proxying through Unix socket is not (yet?) supported."); - return CURL_SOCKET_BAD; -#endif /* USE_UNIX_SOCKETS */ } +#endif /* ENABLE_IPV6 */ if(got_exit_signal) { sclose(serverfd); @@ -1424,6 +1391,9 @@ static void http_connect(curl_socket_t *infdp, bool poll_server_rd[2] = { TRUE, TRUE }; bool poll_client_wr[2] = { TRUE, TRUE }; bool poll_server_wr[2] = { TRUE, TRUE }; +#ifdef TCP_NODELAY + curl_socklen_t flag; +#endif bool primary = FALSE; bool secondary = FALSE; int max_tunnel_idx; /* CTRL or DATA */ @@ -1537,15 +1507,13 @@ static void http_connect(curl_socket_t *infdp, memset(&req2, 0, sizeof(req2)); logmsg("====> Client connect DATA"); #ifdef TCP_NODELAY - if(socket_domain_is_ip()) { - /* Disable the Nagle algorithm */ - curl_socklen_t flag = 1; - if(0 != setsockopt(datafd, IPPROTO_TCP, TCP_NODELAY, - (void *)&flag, sizeof(flag))) - logmsg("====> TCP_NODELAY for client DATA conection failed"); - else - logmsg("TCP_NODELAY set for client DATA conection"); - } + /* Disable the Nagle algorithm */ + flag = 1; + if(0 != setsockopt(datafd, IPPROTO_TCP, TCP_NODELAY, + (void *)&flag, sizeof(flag))) + logmsg("====> TCP_NODELAY for client DATA conection failed"); + else + logmsg("TCP_NODELAY set for client DATA conection"); #endif req2.pipelining = FALSE; init_httprequest(&req2); @@ -1786,14 +1754,6 @@ http_connect_cleanup: *infdp = CURL_SOCKET_BAD; } -static void http2(struct httprequest *req) -{ - (void)req; - logmsg("switched to http2"); - /* left to implement */ -} - - /* returns a socket handle, or 0 if there are no more waiting sockets, or < 0 if there was an error */ static curl_socket_t accept_connection(curl_socket_t sock) @@ -1859,17 +1819,15 @@ static curl_socket_t accept_connection(curl_socket_t sock) num_sockets += 1; #ifdef TCP_NODELAY - if(socket_domain_is_ip()) { - /* - * Disable the Nagle algorithm to make it easier to send out a large - * response in many small segments to torture the clients more. - */ - if(0 != setsockopt(msgsock, IPPROTO_TCP, TCP_NODELAY, - (void *)&flag, sizeof(flag))) - logmsg("====> TCP_NODELAY failed"); - else - logmsg("TCP_NODELAY set"); - } + /* + * Disable the Nagle algorithm to make it easier to send out a large + * response in many small segments to torture the clients more. + */ + if(0 != setsockopt(msgsock, IPPROTO_TCP, TCP_NODELAY, + (void *)&flag, sizeof(flag))) + logmsg("====> TCP_NODELAY failed"); + else + logmsg("TCP_NODELAY set"); #endif return msgsock; @@ -1931,12 +1889,6 @@ static int service_connection(curl_socket_t msgsock, struct httprequest *req, } } - if(req->upgrade_request) { - /* an upgrade request, switch to http2 here */ - http2(req); - return -1; - } - /* if we got a CONNECT, loop and get another request as well! */ if(req->open) { @@ -1954,20 +1906,13 @@ int main(int argc, char *argv[]) int wrotepidfile = 0; int flag; unsigned short port = DEFAULT_PORT; -#ifdef USE_UNIX_SOCKETS - const char *unix_socket = NULL; - bool unlink_socket = false; -#endif char *pidname= (char *)".http.pid"; struct httprequest req; - int rc = 0; + int rc; int error; int arg=1; long pid; const char *connecthost = "127.0.0.1"; - const char *socket_type = "IPv4"; - char port_str[11]; - const char *location_str = port_str; /* a default CONNECT port is basically pointless but still ... */ size_t socket_idx; @@ -1976,14 +1921,15 @@ int main(int argc, char *argv[]) while(argc>arg) { if(!strcmp("--version", argv[arg])) { - puts("sws IPv4" + printf("sws IPv4%s" + "\n" + , #ifdef ENABLE_IPV6 "/IPv6" +#else + "" #endif -#ifdef USE_UNIX_SOCKETS - "/unix" -#endif - ); + ); return 0; } else if(!strcmp("--pidfile", argv[arg])) { @@ -2002,36 +1948,19 @@ int main(int argc, char *argv[]) end_of_headers = "\r\n"; /* gopher style is much simpler */ } else if(!strcmp("--ipv4", argv[arg])) { - socket_type = "IPv4"; - socket_domain = AF_INET; - location_str = port_str; +#ifdef ENABLE_IPV6 + ipv_inuse = "IPv4"; + use_ipv6 = FALSE; +#endif arg++; } else if(!strcmp("--ipv6", argv[arg])) { #ifdef ENABLE_IPV6 - socket_type = "IPv6"; - socket_domain = AF_INET6; - location_str = port_str; + ipv_inuse = "IPv6"; + use_ipv6 = TRUE; #endif arg++; } - else if(!strcmp("--unix-socket", argv[arg])) { - arg++; - if(argc>arg) { -#ifdef USE_UNIX_SOCKETS - unix_socket = argv[arg]; - if(strlen(unix_socket) >= sizeof(me.sau.sun_path)) { - fprintf(stderr, "sws: socket path must be shorter than %zu chars\n", - sizeof(me.sau.sun_path)); - return 0; - } - socket_type = "unix"; - socket_domain = AF_UNIX; - location_str = unix_socket; -#endif - arg++; - } - } else if(!strcmp("--port", argv[arg])) { arg++; if(argc>arg) { @@ -2073,7 +2002,6 @@ int main(int argc, char *argv[]) " --pidfile [file]\n" " --ipv4\n" " --ipv6\n" - " --unix-socket [file]\n" " --port [port]\n" " --srcdir [path]\n" " --connect [ip4-addr]\n" @@ -2082,8 +2010,6 @@ int main(int argc, char *argv[]) } } - snprintf(port_str, sizeof(port_str), "port %hu", port); - #ifdef WIN32 win32_init(); atexit(win32_cleanup); @@ -2093,7 +2019,14 @@ int main(int argc, char *argv[]) pid = (long)getpid(); - sock = socket(socket_domain, SOCK_STREAM, 0); +#ifdef ENABLE_IPV6 + if(!use_ipv6) +#endif + sock = socket(AF_INET, SOCK_STREAM, 0); +#ifdef ENABLE_IPV6 + else + sock = socket(AF_INET6, SOCK_STREAM, 0); +#endif all_sockets[0] = sock; num_sockets = 1; @@ -2120,83 +2053,33 @@ int main(int argc, char *argv[]) goto sws_cleanup; } - switch(socket_domain) { - case AF_INET: +#ifdef ENABLE_IPV6 + if(!use_ipv6) { +#endif memset(&me.sa4, 0, sizeof(me.sa4)); me.sa4.sin_family = AF_INET; me.sa4.sin_addr.s_addr = INADDR_ANY; me.sa4.sin_port = htons(port); rc = bind(sock, &me.sa, sizeof(me.sa4)); - break; #ifdef ENABLE_IPV6 - case AF_INET6: + } + else { memset(&me.sa6, 0, sizeof(me.sa6)); me.sa6.sin6_family = AF_INET6; me.sa6.sin6_addr = in6addr_any; me.sa6.sin6_port = htons(port); rc = bind(sock, &me.sa, sizeof(me.sa6)); - break; -#endif /* ENABLE_IPV6 */ -#ifdef USE_UNIX_SOCKETS - case AF_UNIX: - memset(&me.sau, 0, sizeof(me.sau)); - me.sau.sun_family = AF_UNIX; - strncpy(me.sau.sun_path, unix_socket, sizeof(me.sau.sun_path)); - rc = bind(sock, &me.sa, sizeof(me.sau)); - if(0 != rc && errno == EADDRINUSE) { - struct stat statbuf; - /* socket already exists. Perhaps it is stale? */ - int unixfd = socket(AF_UNIX, SOCK_STREAM, 0); - if(CURL_SOCKET_BAD == unixfd) { - error = SOCKERRNO; - logmsg("Error binding socket, failed to create socket at %s: (%d) %s", - unix_socket, error, strerror(error)); - goto sws_cleanup; - } - /* check whether the server is alive */ - rc = connect(unixfd, &me.sa, sizeof(me.sau)); - error = errno; - close(unixfd); - if(ECONNREFUSED != error) { - logmsg("Error binding socket, failed to connect to %s: (%d) %s", - unix_socket, error, strerror(error)); - goto sws_cleanup; - } - /* socket server is not alive, now check if it was actually a socket. - * Systems which have Unix sockets will also have lstat */ - rc = lstat(unix_socket, &statbuf); - if (0 != rc) { - logmsg("Error binding socket, failed to stat %s: (%d) %s", - unix_socket, errno, strerror(errno)); - goto sws_cleanup; - } - if((statbuf.st_mode & S_IFSOCK) != S_IFSOCK) { - logmsg("Error binding socket, failed to stat %s: (%d) %s", - unix_socket, error, strerror(error)); - goto sws_cleanup; - } - /* dead socket, cleanup and retry bind */ - rc = unlink(unix_socket); - if(0 != rc) { - logmsg("Error binding socket, failed to unlink %s: (%d) %s", - unix_socket, errno, strerror(errno)); - goto sws_cleanup; - } - /* stale socket is gone, retry bind */ - rc = bind(sock, &me.sa, sizeof(me.sau)); - } - break; -#endif /* USE_UNIX_SOCKETS */ } +#endif /* ENABLE_IPV6 */ if(0 != rc) { error = SOCKERRNO; - logmsg("Error binding socket on %s: (%d) %s", - location_str, error, strerror(error)); + logmsg("Error binding socket on port %hu: (%d) %s", + port, error, strerror(error)); goto sws_cleanup; } - logmsg("Running %s %s version on %s", - use_gopher?"GOPHER":"HTTP", socket_type, location_str); + logmsg("Running %s %s version on port %d", + use_gopher?"GOPHER":"HTTP", ipv_inuse, (int)port); /* start accepting connections */ rc = listen(sock, 5); @@ -2207,11 +2090,6 @@ int main(int argc, char *argv[]) goto sws_cleanup; } -#ifdef USE_UNIX_SOCKETS - /* listen succeeds, so let's assume a valid listening Unix socket */ - unlink_socket = true; -#endif - /* ** As soon as this server writes its pid file the test harness will ** attempt to connect to this server and initiate its verification. @@ -2352,13 +2230,6 @@ sws_cleanup: if(sock != CURL_SOCKET_BAD) sclose(sock); -#ifdef USE_UNIX_SOCKETS - if(unlink_socket && socket_domain == AF_UNIX) { - rc = unlink(unix_socket); - logmsg("unlink(%s) = %d (%s)", unix_socket, rc, strerror(rc)); - } -#endif - if(got_exit_signal) logmsg("signalled to die"); @@ -2373,8 +2244,8 @@ sws_cleanup: restore_signal_handlers(); if(got_exit_signal) { - logmsg("========> %s sws (%s pid: %ld) exits with signal (%d)", - socket_type, location_str, pid, exit_signal); + logmsg("========> %s sws (port: %d pid: %ld) exits with signal (%d)", + ipv_inuse, (int)port, pid, exit_signal); /* * To properly set the return status of the process we * must raise the same signal SIGINT or SIGTERM that we diff --git a/tests/server/tftpd.c b/tests/server/tftpd.c index 2555793..745efad 100644 --- a/tests/server/tftpd.c +++ b/tests/server/tftpd.c @@ -1371,7 +1371,7 @@ abort: /* * Send a nak packet (error message). Error code passed in is one of the - * standard TFTP codes, or a Unix errno offset by 100. + * standard TFTP codes, or a UNIX errno offset by 100. */ static void nak(int error) { diff --git a/tests/serverhelp.pm b/tests/serverhelp.pm index 220fba9..b0b5b74 100644 --- a/tests/serverhelp.pm +++ b/tests/serverhelp.pm @@ -109,8 +109,8 @@ sub servername_str { $ipver = (not $ipver) ? 'ipv4' : lc($ipver); die "unsupported IP version: '$ipver'" unless($ipver && - ($ipver =~ /^(4|6|ipv4|ipv6|-ipv4|-ipv6|unix)$/)); - $ipver = ($ipver =~ /6$/) ? '-IPv6' : (($ipver =~ /unix$/) ? '-unix' : ''); + ($ipver =~ /^(4|6|ipv4|ipv6|-ipv4|-ipv6)$/)); + $ipver = ($ipver =~ /6$/) ? '-IPv6' : ''; $idnum = 1 if(not $idnum); die "unsupported ID number: '$idnum'" unless($idnum && diff --git a/tests/sshhelp.pm b/tests/sshhelp.pm index 914879b..ced9a01 100644 --- a/tests/sshhelp.pm +++ b/tests/sshhelp.pm @@ -5,7 +5,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +# Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -417,7 +417,7 @@ sub sshversioninfo { $error = "Error: cannot read or execute $sshbin"; } else { - my $cmd = ($sshbin =~ /$sshdexe$/) ? "\"$sshbin\" -?" : "\"$sshbin\" -V"; + my $cmd = ($sshbin =~ /$sshdexe$/) ? "$sshbin -?" : "$sshbin -V"; $error = "$cmd\n"; foreach my $tmpstr (qx($cmd 2>&1)) { if($tmpstr =~ /OpenSSH[_-](\d+)\.(\d+)(\.(\d+))*/i) { diff --git a/tests/sshserver.pl b/tests/sshserver.pl index d8c2d6f..447305f 100755 --- a/tests/sshserver.pl +++ b/tests/sshserver.pl @@ -6,7 +6,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +# Copyright (C) 1998 - 2011, 2013, Daniel Stenberg, , 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,6 @@ use strict; use warnings; use Cwd; -use Cwd 'abs_path'; #*************************************************************************** # Variables and subs imported from sshhelp module @@ -89,7 +88,6 @@ my $path = getcwd(); # current working directory my $logdir = $path .'/log'; # directory for log files my $username = $ENV{USER}; # default user my $pidfile; # ssh daemon pid file -my $identity = 'curl_client_key'; # default identity file my $error; my @cfgarr; @@ -371,12 +369,12 @@ if((! -e $hstprvkeyf) || (! -s $hstprvkeyf) || # Make sure all files are gone so ssh-keygen doesn't complain unlink($hstprvkeyf, $hstpubkeyf, $cliprvkeyf, $clipubkeyf); logmsg 'generating host keys...' if($verbose); - if(system "\"$sshkeygen\" -q -t dsa -f $hstprvkeyf -C 'curl test server' -N ''") { + if(system "$sshkeygen -q -t dsa -f $hstprvkeyf -C 'curl test server' -N ''") { logmsg 'Could not generate host key'; exit 1; } logmsg 'generating client keys...' if($verbose); - if(system "\"$sshkeygen\" -q -t dsa -f $cliprvkeyf -C 'curl test client' -N ''") { + if(system "$sshkeygen -q -t dsa -f $cliprvkeyf -C 'curl test client' -N ''") { logmsg 'Could not generate client key'; exit 1; } @@ -384,22 +382,6 @@ if((! -e $hstprvkeyf) || (! -s $hstprvkeyf) || #*************************************************************************** -# Convert paths for curl's tests running on Windows using Cygwin OpenSSH -# -my $clipubkeyf_config = abs_path("$path/$clipubkeyf"); -my $hstprvkeyf_config = abs_path("$path/$hstprvkeyf"); -my $pidfile_config = $pidfile; -my $sftpsrv_config = $sftpsrv; - -if ($^O eq 'MSWin32' || $^O eq 'cygwin' || $^O eq 'msys') { - # convert MinGW drive paths to Cygwin drive paths - $clipubkeyf_config =~ s/^\/(\w)\//\/cygdrive\/$1\//; - $hstprvkeyf_config =~ s/^\/(\w)\//\/cygdrive\/$1\//; - $pidfile_config =~ s/^\/(\w)\//\/cygdrive\/$1\//; - $sftpsrv_config = "internal-sftp"; -} - -#*************************************************************************** # ssh daemon configuration file options we might use and version support # # AFSTokenPassing : OpenSSH 1.2.1 and later [1] @@ -497,10 +479,10 @@ push @cfgarr, "AllowUsers $username"; push @cfgarr, 'DenyGroups'; push @cfgarr, 'AllowGroups'; push @cfgarr, '#'; -push @cfgarr, "AuthorizedKeysFile $clipubkeyf_config"; -push @cfgarr, "AuthorizedKeysFile2 $clipubkeyf_config"; -push @cfgarr, "HostKey $hstprvkeyf_config"; -push @cfgarr, "PidFile $pidfile_config"; +push @cfgarr, "AuthorizedKeysFile $path/$clipubkeyf"; +push @cfgarr, "AuthorizedKeysFile2 $path/$clipubkeyf"; +push @cfgarr, "HostKey $path/$hstprvkeyf"; +push @cfgarr, "PidFile $pidfile"; push @cfgarr, '#'; push @cfgarr, "Port $port"; push @cfgarr, "ListenAddress $listenaddr"; @@ -530,7 +512,7 @@ push @cfgarr, 'RhostsRSAAuthentication no'; push @cfgarr, 'RSAAuthentication no'; push @cfgarr, 'ServerKeyBits 768'; push @cfgarr, 'StrictModes no'; -push @cfgarr, "Subsystem sftp \"$sftpsrv_config\""; +push @cfgarr, "Subsystem sftp $sftpsrv"; push @cfgarr, 'SyslogFacility AUTH'; push @cfgarr, 'UseLogin no'; push @cfgarr, 'X11Forwarding no'; @@ -558,7 +540,7 @@ sub sshd_supports_opt { ($sshdid =~ /SunSSH/)) { # ssh daemon supports command line options -t -f and -o $err = grep /((Unsupported)|(Bad configuration)|(Deprecated)) option.*$option/, - qx("$sshd" -t -f $sshdconfig -o $option=$value 2>&1); + qx($sshd -t -f $sshdconfig -o $option=$value 2>&1); return !$err; } if(($sshdid =~ /OpenSSH/) && ($sshdvernum >= 299)) { @@ -569,7 +551,7 @@ sub sshd_supports_opt { return 0; } $err = grep /((Unsupported)|(Bad configuration)|(Deprecated)) option.*$option/, - qx("$sshd" -t -f $sshdconfig 2>&1); + qx($sshd -t -f $sshdconfig 2>&1); unlink $sshdconfig; return !$err; } @@ -715,7 +697,7 @@ if($error) { #*************************************************************************** # Verify that sshd actually supports our generated configuration file # -if(system "\"$sshd\" -t -f $sshdconfig > $sshdlog 2>&1") { +if(system "$sshd -t -f $sshdconfig > $sshdlog 2>&1") { logmsg "sshd configuration file $sshdconfig failed verification"; display_sshdlog(); display_sshdconfig(); @@ -757,19 +739,6 @@ if((! -e $knownhosts) || (! -s $knownhosts)) { #*************************************************************************** -# Convert paths for curl's tests running on Windows using Cygwin OpenSSH -# -my $identity_config = abs_path("$path/$identity"); -my $knownhosts_config = abs_path("$path/$knownhosts"); - -if ($^O eq 'MSWin32' || $^O eq 'cygwin' || $^O eq 'msys') { - # convert MinGW drive paths to Cygwin drive paths - $identity_config =~ s/^\/(\w)\//\/cygdrive\/$1\//; - $knownhosts_config =~ s/^\/(\w)\//\/cygdrive\/$1\//; -} - - -#*************************************************************************** # ssh client configuration file options we might use and version support # # AddressFamily : OpenSSH 3.7.0 and later @@ -865,8 +834,8 @@ push @cfgarr, '#'; push @cfgarr, "BindAddress $listenaddr"; push @cfgarr, "DynamicForward $socksport"; push @cfgarr, '#'; -push @cfgarr, "IdentityFile $identity_config"; -push @cfgarr, "UserKnownHostsFile $knownhosts_config"; +push @cfgarr, "IdentityFile $path/curl_client_key"; +push @cfgarr, "UserKnownHostsFile $path/$knownhosts"; push @cfgarr, '#'; push @cfgarr, 'BatchMode yes'; push @cfgarr, 'ChallengeResponseAuthentication no'; @@ -1056,16 +1025,16 @@ if($error) { # Start the ssh server daemon without forking it # logmsg "SCP/SFTP server listening on port $port" if($verbose); -my $rc = system "\"$sshd\" -e -D -f $sshdconfig > $sshdlog 2>&1"; +my $rc = system "$sshd -e -D -f $sshdconfig > $sshdlog 2>&1"; if($rc == -1) { - logmsg "\"$sshd\" failed with: $!"; + logmsg "$sshd failed with: $!"; } elsif($rc & 127) { - logmsg sprintf("\"$sshd\" died with signal %d, and %s coredump", + logmsg sprintf("$sshd died with signal %d, and %s coredump", ($rc & 127), ($rc & 128)?'a':'no'); } elsif($verbose && ($rc >> 8)) { - logmsg sprintf("\"$sshd\" exited with %d", $rc >> 8); + logmsg sprintf("$sshd exited with %d", $rc >> 8); } diff --git a/tests/symbol-scan.pl b/tests/symbol-scan.pl index 89f5eef..91b859b 100644 --- a/tests/symbol-scan.pl +++ b/tests/symbol-scan.pl @@ -27,23 +27,13 @@ use strict; use warnings; -use vars qw($Cpreprocessor); # # configurehelp perl module is generated by configure script # -my $rc = eval { - require configurehelp; - configurehelp->import(qw( - $Cpreprocessor - )); - 1; -}; -# Set default values if configure has not generated a configurehelp.pm file. -# This is the case with cmake. -if (!$rc) { - $Cpreprocessor = 'cpp'; -} +use configurehelp qw( + $Cpreprocessor + ); # we may get the dir root pointed out my $root=$ARGV[0] || "."; diff --git a/tests/testcurl.pl b/tests/testcurl.pl index 8c804e4..f71f6d7 100755 --- a/tests/testcurl.pl +++ b/tests/testcurl.pl @@ -73,7 +73,7 @@ use vars qw($name $email $desc $confopts $runtestopts $setupfile $mktarball $timestamp $notes); # version of this script -$version='2014-11-25'; +$version='2012-11-30'; $fixed=0; # Determine if we're running from git or a canned copy of curl, @@ -258,13 +258,7 @@ sub get_host_triplet { return $triplet; } -if($name && $email && $desc) { - # having these fields set are enough to continue, skip reading the setup - # file - $infixed=4; - $fixed=4; -} -elsif (open(F, "$setupfile")) { +if (open(F, "$setupfile")) { while () { if (/(\w+)=(.*)/) { eval "\$$1=$2;"; @@ -272,8 +266,7 @@ elsif (open(F, "$setupfile")) { } close(F); $infixed=$fixed; -} -else { +} else { $infixed=0; # so that "additional args to configure" works properly first time... } @@ -340,7 +333,6 @@ logit "EMAIL = $email"; logit "DESC = $desc"; logit "NOTES = $notes"; logit "CONFOPTS = $confopts"; -logit "RUNTESTOPTS = ".$runtestopts; logit "CPPFLAGS = ".$ENV{CPPFLAGS}; logit "CFLAGS = ".$ENV{CFLAGS}; logit "LDFLAGS = ".$ENV{LDFLAGS}; diff --git a/tests/unit/unit1302.c b/tests/unit/unit1302.c index 412a71f..6886af8 100644 --- a/tests/unit/unit1302.c +++ b/tests/unit/unit1302.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , 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,24 +73,6 @@ fail_unless(size == 8, "size should be 8"); verify_memory( output, "aWlpaQ==", 8); Curl_safefree(output); -rc = Curl_base64_encode(data, "\xff\x01\xfe\x02", 4, &output, &size); -fail_unless(rc == CURLE_OK, "return code should be CURLE_OK"); -fail_unless(size == 8, "size should be 8"); -verify_memory( output, "/wH+Ag==", 8); -Curl_safefree(output); - -rc = Curl_base64url_encode(data, "\xff\x01\xfe\x02", 4, &output, &size); -fail_unless(rc == CURLE_OK, "return code should be CURLE_OK"); -fail_unless(size == 8, "size should be 8"); -verify_memory( output, "_wH-Ag==", 8); -Curl_safefree(output); - -rc = Curl_base64url_encode(data, "iiii", 4, &output, &size); -fail_unless(rc == CURLE_OK, "return code should be CURLE_OK"); -fail_unless(size == 8, "size should be 8"); -verify_memory( output, "aWlpaQ==", 8); -Curl_safefree(output); - /* 0 length makes it do strlen() */ rc = Curl_base64_encode(data, "iiii", 0, &output, &size); fail_unless(rc == CURLE_OK, "return code should be CURLE_OK"); diff --git a/tests/unit/unit1397.c b/tests/unit/unit1397.c index fd60c23..2a67b13 100644 --- a/tests/unit/unit1397.c +++ b/tests/unit/unit1397.c @@ -15,7 +15,8 @@ static void unit_stop( void ) UNITTEST_START /* only these backends define the tested functions */ -#if defined(USE_SSLEAY) || defined(USE_AXTLS) || defined(USE_GSKIT) +#if defined(USE_SSLEAY) || defined(USE_AXTLS) || defined(USE_QSOSSL) || \ + defined(USE_GSKIT) /* here you start doing things and checking that the results are good */ diff --git a/winbuild/BUILD.WINDOWS.txt b/winbuild/BUILD.WINDOWS.txt index 7d6b364..757c41f 100644 --- a/winbuild/BUILD.WINDOWS.txt +++ b/winbuild/BUILD.WINDOWS.txt @@ -19,7 +19,7 @@ Building with Visual C++, prerequises http://www.microsoft.com/en-us/download/details.aspx?id=12261 - If you wish to support zlib, openssl, c-ares, ssh2, you will have to download + If you wish to support zlib, openssl, ssh2, you will have to download them separately and copy them to the deps directory as shown below: somedirectory\ @@ -64,7 +64,6 @@ where is one or many of: Libraries can be fetched at http://windows.php.net/downloads/php-sdk/deps/ Uncompress them into the deps folder. WITH_SSL= - Enable OpenSSL support, DLL or static - WITH_CARES= - Enable c-ares support, DLL or static WITH_ZLIB= - Enable zlib support, DLL or static WITH_SSH2= - Enable libSSH2 support, DLL or static ENABLE_SSPI= - Enable SSPI support, defaults to yes diff --git a/winbuild/Makefile.vc b/winbuild/Makefile.vc index 21e1614..90719a8 100644 --- a/winbuild/Makefile.vc +++ b/winbuild/Makefile.vc @@ -21,7 +21,6 @@ CFGSET=true !MESSAGE Libraries can be fetched at http://pecl2.php.net/downloads/php-windows-builds/ !MESSAGE Uncompress them into the deps folder. !MESSAGE WITH_SSL= - Enable OpenSSL support, DLL or static -!MESSAGE WITH_CARES= - Enable c-ares support, DLL or static !MESSAGE WITH_ZLIB= - Enable zlib support, DLL or static !MESSAGE WITH_SSH2= - Enable libSSH2 support, DLL or static !MESSAGE ENABLE_IDN= - Enable use of Windows IDN APIs, defaults to yes @@ -29,6 +28,7 @@ CFGSET=true !MESSAGE http://www.microsoft.com/downloads/details.aspx?FamilyID=AD6158D7-DDBA-416A-9109-07607425A815 !MESSAGE ENABLE_IPV6= - Enable IPv6, defaults to yes !MESSAGE ENABLE_SSPI= - Enable SSPI support, defaults to yes +!MESSAGE ENABLE_SPNEGO= - Enable Simple and Protected GSSAPI Negotiation Mechanism, defaults to yes !MESSAGE ENABLE_WINSSL= - Enable native Windows SSL support, defaults to yes !MESSAGE GEN_PDB= - Generate Program Database (debug symbols for release build) !MESSAGE DEBUG= - Debug builds @@ -86,6 +86,14 @@ USE_SSPI = true USE_SSPI = false !ENDIF +!IFNDEF ENABLE_SPNEGO +USE_SPNEGO = true +!ELSEIF "$(ENABLE_SPNEGO)"=="yes" +USE_SPNEGO = true +!ELSEIF "$(ENABLE_SPNEGO)"=="no" +USE_SPNEGO = false +!ENDIF + !IFNDEF ENABLE_WINSSL !IFDEF WITH_SSL USE_WINSSL = false @@ -108,14 +116,6 @@ USE_SSL = true SSL = static !ENDIF -!IF "$(WITH_CARES)"=="dll" -USE_CARES = true -CARES = dll -!ELSEIF "$(WITH_CARES)"=="static" -USE_CARES = true -CARES = static -!ENDIF - !IF "$(WITH_ZLIB)"=="dll" USE_ZLIB = true ZLIB = dll @@ -150,10 +150,6 @@ CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-static CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ssl-$(SSL) !ENDIF -!IF "$(USE_CARES)"=="true" -CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-cares-$(CARES) -!ENDIF - !IF "$(USE_ZLIB)"=="true" CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-zlib-$(ZLIB) !ENDIF @@ -170,6 +166,10 @@ CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ipv6 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-sspi !ENDIF +!IF "$(USE_SPNEGO)"=="true" +CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-spnego +!ENDIF + !IF "$(USE_WINSSL)"=="true" CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-winssl !ENDIF @@ -197,6 +197,7 @@ $(MODE): @SET USE_IDN=$(USE_IDN) @SET USE_IPV6=$(USE_IPV6) @SET USE_SSPI=$(USE_SSPI) + @SET USE_SPNEGO=$(USE_SPNEGO) @SET USE_WINSSL=$(USE_WINSSL) @$(MAKE) /NOLOGO /F MakefileBuild.vc diff --git a/winbuild/MakefileBuild.vc b/winbuild/MakefileBuild.vc index 985c1bc..828fe4f 100644 --- a/winbuild/MakefileBuild.vc +++ b/winbuild/MakefileBuild.vc @@ -121,27 +121,6 @@ SSL = static SSL_CFLAGS = /DUSE_SSLEAY /I"$(DEVEL_INCLUDE)/openssl" !ENDIF -!IF "$(WITH_CARES)"=="dll" -!IF "$(DEBUG)"=="yes" -CARES_LIBS = caresd.lib -!ELSE -CARES_LIBS = cares.lib -!ENDIF -USE_CARES = true -CARES = dll -!ELSEIF "$(WITH_CARES)"=="static" -!IF "$(DEBUG)"=="yes" -CARES_LIBS = libcaresd.lib -!ELSE -CARES_LIBS = libcares.lib -!ENDIF -USE_CARES = true -CARES = static -!ENDIF - -!IFDEF USE_CARES -CARES_CFLAGS = /DUSE_ARES /I"$(DEVEL_INCLUDE)/cares" -!ENDIF !IF "$(WITH_ZLIB)"=="dll" ZLIB_LIBS = zlib.lib @@ -208,6 +187,17 @@ SSPI_CFLAGS = $(SSPI_CFLAGS) /DUSE_WINDOWS_SSPI !ENDIF +!IFNDEF USE_SPNEGO +USE_SPNEGO = true +!ELSEIF "$(USE_SPNEGO)"=="yes" +USE_SPNEGO = true +!ENDIF + +!IF "$(USE_SPNEGO)"=="true" +SPNEGO_CFLAGS = $(SPNEGO_CFLAGS) /DHAVE_SPNEGO +!ENDIF + + !IFNDEF USE_WINSSL !IF "$(USE_SSL)"=="true" USE_WINSSL = false @@ -318,11 +308,6 @@ CFLAGS = $(CFLAGS) $(SSL_CFLAGS) LFLAGS = $(LFLAGS) $(SSL_LFLAGS) $(SSL_LIBS) !ENDIF -!IF "$(USE_CARES)"=="true" -CFLAGS = $(CFLAGS) $(CARES_CFLAGS) -LFLAGS = $(LFLAGS) $(CARES_LFLAGS) $(CARES_LIBS) -!ENDIF - !IF "$(USE_ZLIB)"=="true" CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS) $(ZLIB_LIBS) @@ -345,6 +330,10 @@ CFLAGS = $(CFLAGS) $(IPV6_CFLAGS) CFLAGS = $(CFLAGS) $(SSPI_CFLAGS) !ENDIF +!IF "$(USE_SPNEGO)"=="true" +CFLAGS = $(CFLAGS) $(SPNEGO_CFLAGS) +!ENDIF + !IF "$(GEN_PDB)"=="true" CFLAGS = $(CFLAGS) $(CFLAGS_PDB) /Fd"$(LIB_DIROBJ)\$(PDB)" LFLAGS = $(LFLAGS) $(LFLAGS_PDB) @@ -402,12 +391,12 @@ package: $(TARGET) $(TARGET): $(LIB_OBJS) $(LIB_DIROBJ) $(DISTDIR) @echo Using SSL: $(USE_SSL) - @echo Using c-ares: $(USE_CARES) @echo Using SSH2: $(USE_SSH2) @echo Using ZLIB: $(USE_ZLIB) @echo Using IDN: $(USE_IDN) @echo Using IPv6: $(USE_IPV6) @echo Using SSPI: $(USE_SSPI) + @echo Using SPNEGO: $(USE_SPNEGO) @echo Using WinSSL: $(USE_WINSSL) @echo CFLAGS: $(CFLAGS) @echo LFLAGS: $(LFLAGS) diff --git a/winbuild/gen_resp_file.bat b/winbuild/gen_resp_file.bat index 434f369..d08b01e 100755 --- a/winbuild/gen_resp_file.bat +++ b/winbuild/gen_resp_file.bat @@ -1,6 +1,6 @@ -@echo OFF -@del %OUTFILE% -@echo %MACRO_NAME% = \> %OUTFILE% +@echo OFF +@del %OUTFILE% +@echo %MACRO_NAME% = \> %OUTFILE% @for %%i in (%*) do @echo %DIROBJ%/%%i \>> %OUTFILE% -@echo. >> %OUTFILE% -:END +@echo. >> %OUTFILE% +:END -- 2.7.4